Skip to content
This repository was archived by the owner on Sep 9, 2021. It is now read-only.

Commit fc0a874

Browse files
committedFeb 22, 2017
Fix test with array of files
1 parent 60c789d commit fc0a874

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed
 

‎test/index.js

+6-6
Original file line numberDiff line numberDiff line change
@@ -73,12 +73,12 @@ describe('worker-loader', () => {
7373
.reduce((acc, item) => acc.concat(item), [])
7474
.map(item => item.files)
7575
.map(item => `expected/name-options/${item}`);
76-
assert.deepEqual(files, [
77-
'expected/name-options/w1.js',
78-
'expected/name-options/w2.js',
79-
]);
80-
assert.notEqual(readFile(files[0]).indexOf('// w1 via worker options'), -1);
81-
assert.notEqual(readFile(files[1]).indexOf('// w2 via worker options'), -1);
76+
const w1 = files.find(file => file === 'expected/name-options/w1.js');
77+
const w2 = files.find(file => file === 'expected/name-options/w2.js');
78+
assert(w1);
79+
assert(w2);
80+
assert.notEqual(readFile(w1).indexOf('// w1 via worker options'), -1);
81+
assert.notEqual(readFile(w2).indexOf('// w2 via worker options'), -1);
8282
})
8383
);
8484

0 commit comments

Comments
 (0)
This repository has been archived.