Removed support for css-modules (for now) in tests and fixed css/scss imports from node_modules

This commit is contained in:
Andrey Okonetchnikov 2016-11-11 12:08:20 +01:00
parent 63b8559d7e
commit d39c9cee2c
2 changed files with 3 additions and 4 deletions

View File

@ -35,8 +35,7 @@
"jest": { "jest": {
"moduleNameMapper": { "moduleNameMapper": {
"^.+\\.(png|eot|woff|woff2|ttf|svg|gif)$": "<rootDir>/__mocks__/fileLoaderMock.js", "^.+\\.(png|eot|woff|woff2|ttf|svg|gif)$": "<rootDir>/__mocks__/fileLoaderMock.js",
"^.+\\.scss$": "<rootDir>/__mocks__/styleLoaderMock.js", "^.+\\.s?css$": "<rootDir>/__mocks__/styleLoaderMock.js"
"^.+\\.css$": "identity-obj-proxy"
} }
}, },
"keywords": [ "keywords": [

View File

@ -9,6 +9,7 @@ module.exports = wallaby => ({
'src/**/*.js', 'src/**/*.js',
'src/**/*.js.snap', 'src/**/*.js.snap',
'!src/**/*.spec.js', '!src/**/*.spec.js',
{ pattern: 'src/**/*.css', instrument: false },
], ],
tests: ['src/**/*.spec.js'], tests: ['src/**/*.spec.js'],
@ -31,8 +32,7 @@ module.exports = wallaby => ({
wallaby.testFramework.configure({ wallaby.testFramework.configure({
moduleNameMapper: { moduleNameMapper: {
'^.+\\.(png|eot|woff|woff2|ttf|svg|gif)$': require('path').join(wallaby.localProjectDir, '__mocks__', 'fileLoaderMock.js'), '^.+\\.(png|eot|woff|woff2|ttf|svg|gif)$': require('path').join(wallaby.localProjectDir, '__mocks__', 'fileLoaderMock.js'),
'^.+\\.scss$': require('path').join(wallaby.localProjectDir, '__mocks__', 'styleLoaderMock.js'), '^.+\\.s?css$': require('path').join(wallaby.localProjectDir, '__mocks__', 'styleLoaderMock.js'),
'^.+\\.css$': require('identity-obj-proxy'),
}, },
}); });
}, },