Hi, I'm trying to use this in electron, but the sass module can't be found. I get an "Illigal invocation" error, and I'm not proficient enough with electron to know what is going on, and how to update configuration to get this package working with the @jest-runner/electron one. I need an actual browser and rendering because I want to test the eventual colours of elements. So any help is very appreciated.
This is my config:
jest-config.js
//...
displayName: 'Real browser',
runner: require.resolve('@jest-runner/electron'),
testEnvironment: require.resolve('@jest-runner/electron/environment'),
testMatch: ['**/*.spec.{???,??}'],
transform: {
'\\.(scss|css)$': require.resolve('jest-css-modules-transform'),
},
//...
jest-css-modules-transform-config.js
const sharedPostcssConfig = require('@company/tools-config-postcss');
module.exports = {
injectIntoDOM: true,
sassModuleName: require.resolve('sass'),
postcssConfig: sharedPostcssConfig(null, { mode: 'none' }),
};
Hi, I'm trying to use this in electron, but the sass module can't be found. I get an "Illigal invocation" error, and I'm not proficient enough with electron to know what is going on, and how to update configuration to get this package working with the
@jest-runner/electronone. I need an actual browser and rendering because I want to test the eventual colours of elements. So any help is very appreciated.This is my config:
jest-config.jsjest-css-modules-transform-config.js