Skip to content

Commit

Permalink
Minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
lindgr3n committed May 16, 2017
1 parent da690f5 commit ec93885
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ exports[`moduleNameMapper wrong configuration 1`] = `
Configuration error:
Unknown module in configuration option moduleNameMapper
Please check: /\\\\.(css|less)$/: module-that-dont-exist
Please check: /\\\\.(css|less)$/: no-such-module
Configuration error:
Unknown module in configuration option moduleNameMapper
Please check: /\\\\.(css|less)$/: module-that-dont-exist
Please check: /\\\\.(css|less)$/: no-such-module
"
Expand Down
8 changes: 8 additions & 0 deletions integration_tests/__tests__/moduleNameMapper-test.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
/**
* Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/

const runJest = require('../runJest');
const {extractSummary} = require('../utils');

Expand Down
1 change: 0 additions & 1 deletion integration_tests/moduleNameMapper-correct-config/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,5 @@
*/

'use strict';
// Inlcude style so moduleNameMapping triggers
require('./style.css');
module.exports = () => 'test';
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"jest": {
"moduleNameMapper": {
"\\.(css|less)$": "./__mocks__/styleMock.js"
}
"jest": {
"moduleNameMapper": {
"\\.(css|less)$": "./__mocks__/styleMock.js"
}
}
}
1 change: 0 additions & 1 deletion integration_tests/moduleNameMapper-wrong-config/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,5 @@
*/

'use strict';
// Inlcude style so moduleNameMapping triggers
require('./style.css');
module.exports = () => 'test';
8 changes: 4 additions & 4 deletions integration_tests/moduleNameMapper-wrong-config/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"jest": {
"moduleNameMapper": {
"\\.(css|less)$": "module-that-dont-exist"
}
"jest": {
"moduleNameMapper": {
"\\.(css|less)$": "no-such-module"
}
}
}
1 change: 1 addition & 0 deletions packages/jest-resolve/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"browser-resolve": "^1.11.2",
"chalk": "^1.1.3",
"is-builtin-module": "^1.0.0",
"jest-validate": "^20.0.1",
"resolve": "^1.3.2"
},
"devDependencies": {
Expand Down

0 comments on commit ec93885

Please sign in to comment.