- Add
devDependencies
:@babel/preset-env
,@babel/preset-typescript
,@types/jest
,jest
- Create
babel.config.js
file:
module.exports = {
presets: [
[
'@babel/preset-env', { targets: { node: 'current' } }
],
'@babel/preset-typescript',
],
};
- Add
scripts
:"test": "jest"