Skip to content

Commit

Permalink
Mock scss imports in jest
Browse files Browse the repository at this point in the history
  • Loading branch information
glendaviesnz committed Feb 27, 2023
1 parent ccb0b2a commit a1e270a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions projects/plugins/jetpack/tests/jest.config.extensions.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,8 @@ module.exports = {
...baseConfig.testPathIgnorePatterns,
'extensions/shared/test/block-fixtures.js',
],
moduleNameMapper:{
...baseConfig.moduleNameMapper,
"\\.(css|less|sass|scss)$": "<rootDir>/tests/styles-mock.js",
}
};
1 change: 1 addition & 0 deletions projects/plugins/jetpack/tests/styles-mock.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = {};

0 comments on commit a1e270a

Please sign in to comment.