This projects uses the jest package to run tests.
For this projet I had to make configure babel to use the import/export keywords. Look at the steps below if you are interested in how I did this:
-
install jest
npm install --save-dev jest babel-jest @babel/preset-env
-
create babel.config.js to transpile code to use ES6 import/export keywords
module.exports = {
presets: [
[
'@babel/preset-env',
{
targets: {
node: 'current',
},
},
],
],
};npm run testfoo@bar:~$ npm run testThis projects uses the jest-bench package to run benchmarks.
npm run bench