Skip to content

Commit e830c81

Browse files
committed
Move style mock under mocks/
Signed-off-by: Tyler Ohlsen <ohltyler@amazon.com>
1 parent 8d110a9 commit e830c81

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

test/jest.config.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,10 @@ module.exports = {
77
rootDir: '../',
88
roots: ['<rootDir>'],
99
coverageDirectory: './coverage',
10+
// we mock any style-related files and return an empty module. This is needed due to errors
11+
// when jest tries to interpret these types of files.
1012
moduleNameMapper: {
11-
'\\.(css|less|scss|sass)$': '<rootDir>/test/style_stub.js',
13+
'\\.(css|less|scss|sass)$': '<rootDir>/test/mocks/style_mock.ts',
1214
},
1315
testEnvironment: 'jest-environment-jsdom',
1416
coverageReporters: ['lcov', 'text', 'cobertura'],

test/style_stub.js test/mocks/style_mock.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
* SPDX-License-Identifier: Apache-2.0
44
*/
55

6-
module.exports = {};
6+
export default {};

0 commit comments

Comments
 (0)