You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
module.exports=function(wallaby){varpath=require('path')process.env.NODE_PATH+=path.delimiter+path.join(wallaby.projectCacheDir,'common')return{// for node.js tests you need to set env property as well// https://wallabyjs.com/docs/integration/node.htmlfiles: ['common/**/*.ts*','server/**/*.ts*',{pattern: '**/*.scss*',load: false,instrument: false},'jest.json','!common/**/*.spec*.ts*','!server/**/*.spec*.ts*'],tests: ['server/**/*.spec*.ts*','common/**/*.spec*.ts*'],env: {type: 'node',runner: 'node'},testFramework: 'jest',setup: function(wallaby){require.extensions['.scss']=()=>''},preprocessors: {'**/*.scss': file=>''},}}
Code editor or IDE name and version
Visual Studio Code v1.x
OS name and version
Windows
The text was updated successfully, but these errors were encountered:
would work in plain node/mocha, but jest has its own module loading mechanism, so in order to mock certain files, you need to use the jest moduleNameMapper setting. See more details here.
You may create a <rootDir>/stub.js file with just module.exports = {}; in it, and add this to your setup function:
setup: function(wallaby){// or add the moduleNameMapper setting to jest config in your package.json insteadwallaby.testFramework.configure({moduleNameMapper: {'^.+\\.scss$': '<rootDir>/stub.js'}});},
Issue description or question
We have an internal component library which still has scss imports which I can't seem to get to compile.
Wallaby.js configuration file
Code editor or IDE name and version
Visual Studio Code v1.x
OS name and version
Windows
The text was updated successfully, but these errors were encountered: