Skip to content

Commit 4f49b0a

Browse files
committed
Merge pull request #140 from rndstr/feature/disable-more-webpack-features-for-testing
Added .scss as excluded feature for tests
2 parents 7d0a187 + f687cc5 commit 4f49b0a

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

tools/testSetup.js

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,9 @@ process.env.NODE_ENV = 'production';
1111

1212
// Disable webpack-specific features for tests since
1313
// Mocha doesn't know what to do with them.
14-
require.extensions['.css'] = () => {
15-
return null;
16-
};
17-
require.extensions['.png'] = () => {
18-
return null;
19-
};
20-
require.extensions['.jpg'] = () => {
21-
return null;
22-
};
14+
['.css', '.scss', '.png', '.jpg'].forEach(ext => {
15+
require.extensions[ext] = () => null;
16+
});
2317

2418
// Register babel so that it will transpile ES6 to ES5
2519
// before our tests run.

0 commit comments

Comments
 (0)