-
Notifications
You must be signed in to change notification settings - Fork 44
Open
Description
#I have this setup in my jest config.
moduleNameMapper: {
'^.+\\.(scss)$': '<rootDir>/test/utils/css-hooks.js'
},const hook = require('css-modules-require-hook');
const sass = require('node-sass');
hook({
extensions: [
'.scss'
],
preprocessCss: (data, file) => {
return sass.renderSync({ // eslint-disable-line no-sync
data,
file
}).css;
}
});When I use mocha this resolves to _styles_header__styles which is something I can test against.
// mocha.opts
--require ./test/utils/css-hooks.jsHowever, in jest this returns undefined.
Metadata
Metadata
Assignees
Labels
No labels