Skip to content

Commit

Permalink
Fix test.
Browse files Browse the repository at this point in the history
  • Loading branch information
mpratt committed Feb 1, 2018
1 parent d1563c7 commit 6f2519b
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion test/fixtures/wrong-case/entry.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
var testModule = require('./TestFile');
var testModule = require('./ExistingTestFile');
1 change: 1 addition & 0 deletions test/fixtures/wrong-case/existingTestFile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = '';
1 change: 0 additions & 1 deletion test/fixtures/wrong-case/testfile.js

This file was deleted.

8 changes: 4 additions & 4 deletions test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ describe("CaseSensitivePathsPlugin", function() {
let jsonStats = stats.toJson();
assert.equal(jsonStats.errors.length, 1);

let error = jsonStats.errors[0].split("\n");
let error = jsonStats.errors[0];
// check that the plugin produces the correct output
assert(error[1].indexOf('[CaseSensitivePathsPlugin]') > -1);
assert(error[1].indexOf('TestFile.js') > -1); // wrong file require
assert(error[1].indexOf('testfile.js') > -1); // actual file name
assert(error.indexOf('[CaseSensitivePathsPlugin]') > -1);
assert(error.indexOf('ExistingTestFile.js') > -1); // wrong file require
assert(error.indexOf('existingTestFile.js') > -1); // actual file name

done();
});
Expand Down

0 comments on commit 6f2519b

Please sign in to comment.