Skip to content

Commit

Permalink
feat(DEV-17): fix failing jest tests
Browse files Browse the repository at this point in the history
  • Loading branch information
hhimanshu committed Jul 2, 2021
1 parent dbc1d2e commit 2798037
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
5 changes: 4 additions & 1 deletion jest.config.ts
Expand Up @@ -74,7 +74,10 @@ export default {
// ],

// A map from regular expressions to module names or to arrays of module names that allow to stub out resources with a single module
// moduleNameMapper: {},
moduleNameMapper: {
'\\.(css|less|sass|scss)$': '<rootDir>/src/__mocks__/styleMock.js',
'\\.(gif|ttf|eot|svg)$': '<rootDir>/src/__mocks__/fileMock.js',
},

// An array of regexp pattern strings, matched against all module paths before considered 'visible' to the module loader
// modulePathIgnorePatterns: [],
Expand Down
1 change: 1 addition & 0 deletions src/__mocks__/fileMock.js
@@ -0,0 +1 @@
module.exports = 'test-file-stub'
1 change: 1 addition & 0 deletions src/__mocks__/styleMock.js
@@ -0,0 +1 @@
module.exports = {};

0 comments on commit 2798037

Please sign in to comment.