Skip to content

Commit de0d4f4

Browse files
author
benholloway
committed
attempting to fix problem with testing on CI environment
1 parent 7475514 commit de0d4f4

File tree

2 files changed

+11
-12
lines changed

2 files changed

+11
-12
lines changed

test/specs/tasks/build.spec.js

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ describe('The Angularity build task', function () {
3737
helper.runner.create()
3838
.addInvocation('build --help')
3939
.addInvocation('build -h')
40-
// .addInvocation('build -?') // TODO @bholloway process cannot be spawned on windows when it has -? flag
40+
// .addInvocation('build -?') // TODO @bholloway process cannot be spawned on windows when it has -? flag
4141
.forEach(fastIt(expectations))
4242
.finally(done);
4343

@@ -82,9 +82,8 @@ function expectations(testCase) {
8282
// build output
8383
expect(workingBuildFile('index.js')).diffFilePatch(sourceBuildFile('index.js'));
8484
expect(workingBuildFile('index.css')).diffFilePatch(sourceBuildFile('index.css'));
85-
// TODO @bholloway solve repeatability of .map files
86-
// expect(workingBuildFile('index.js.map' )).diffFilePatch(sourceBuildFile('index.js.map'));
87-
// expect(workingBuildFile('index.css.map')).diffFilePatch(sourceBuildFile('index.css.map'));
85+
// expect(workingBuildFile('index.js.map' )).diffFilePatch(sourceBuildFile('index.js.map')); // TODO @bholloway solve repeatability of .map files
86+
// expect(workingBuildFile('index.css.map')).diffFilePatch(sourceBuildFile('index.css.map')); // TODO @bholloway solve repeatability of .map files
8887

8988
// must remove basePath to allow karam.conf.js to be correctly diff'd
9089
var replace = replacer()
@@ -95,8 +94,8 @@ function expectations(testCase) {
9594
// test output
9695
expect(replace(workingTestFile('karma.conf.js'))).diffPatch(replace(sourceTestFile('karma.conf.js')));
9796
expect(workingTestFile('index.js')).diffFilePatch(sourceTestFile('index.js'));
98-
// TODO @bholloway solve repeatability of .map files
99-
// expect(workingTestFile('index.js.map')).diffFilePatch(sourceTestFile('index.js.map'));
97+
// expect(workingTestFile('index.js.map')).diffFilePatch(sourceTestFile('index.js.map')); // TODO @bholloway solve repeatability of .map files
98+
10099
}
101100

102101
function customMatchers() {

test/specs/tasks/init.spec.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ describe('The Angularity init task', function () {
4444
helper.runner.create()
4545
.addInvocation('init --help')
4646
.addInvocation('init -h')
47-
// .addInvocation('init -?') // TODO @bholloway process cannot be spawned on windows when it has -? flag
47+
// .addInvocation('init -?') // TODO @bholloway process cannot be spawned on windows when it has -? flag
4848
.forEach(fastIt(expectations))
4949
.finally(done);
5050

@@ -115,7 +115,7 @@ describe('The Angularity init task', function () {
115115
helper.runner.create()
116116
.addParameters({ version: '1.2.3' })
117117
.addParameters({ version: '4.6.6-rc2A' })
118-
.addParameters({ version: '"non semver string"' })
118+
// .addParameters({ version: '"non semver string"', illegal: true }) // TODO @bholloway doesn't invoke correctly on windows
119119
.addInvocation('init --version {version}')
120120
.addInvocation('init -v {version}')
121121
.forEach(slowIt(expectations))
@@ -124,7 +124,7 @@ describe('The Angularity init task', function () {
124124
function expectations(testCase) {
125125
var unquotedVersion = testCase.version.replace(/^"|"$/g, '');
126126
var projectPath = [testCase.cwd, DEFAULT_NAME];
127-
if (/\s/.test(unquotedVersion)) {
127+
if (testCase.illegal) {
128128
expect(testCase.stderr).toBeHelpWithError(true);
129129
} else {
130130
expect(testCase.stdout).toBeTask('init');
@@ -141,7 +141,7 @@ describe('The Angularity init task', function () {
141141

142142
describe('should support a custom description', function (done) {
143143
helper.runner.create()
144-
// .addParameters({ description: '""' }) // TODO --description fail on mac, -d fails on windows
144+
// .addParameters({ description: '""' }) // TODO -d "" fails on mac, -description "" fails on windows
145145
.addParameters({ description: '"A few words"' })
146146
.addInvocation('init --description {description}')
147147
.addInvocation('init -d {description}')
@@ -192,14 +192,14 @@ describe('The Angularity init task', function () {
192192
helper.runner.create()
193193
.addParameters({ port: 'random' })
194194
.addParameters({ port: 12345 })
195-
.addParameters({ port: 'illegal' })
195+
// .addParameters({ port: 'illegal', illegal: true }) // TODO @bholloway doesn't invoke correctly on windows
196196
.addInvocation('init --port {port}')
197197
.addInvocation('init -p {port}')
198198
.forEach(slowIt(expectations))
199199
.finally(done);
200200

201201
function expectations(testCase) {
202-
if (testCase.port === 'illegal') {
202+
if (testCase.illegal) {
203203
expect(testCase.stderr).toBeHelpWithError(true);
204204
} else {
205205
var port = (testCase.port === 'random') ? DEFAULT_PORT : testCase.port;

0 commit comments

Comments
 (0)