Testing with wallaby.js and Jest
Install Jest
npm install
Configure wallaby.js
Create wallaby.js configuration file.
module.exports = function () {
return {
files: ['sum.js'],
tests: ['__tests__/*.js'],
env: {
type: 'node',
runner: 'node'
},
testFramework: 'jest'
};
};
Please note that wallaby.js is using its own cache to run your tests from, not the local project folder, so you need to include all files (except node modules) that your tests need, for example __mocks__/*.*
, etc.