Skip to content

Commit

Permalink
Install Babel to use it with jest & add its config
Browse files Browse the repository at this point in the history
in order to suppoort ECMAScript Modules in Jest tests.
  • Loading branch information
ama-leanix committed Feb 20, 2024
1 parent b804831 commit 51c8ac0
Show file tree
Hide file tree
Showing 4 changed files with 2,123 additions and 464 deletions.
12 changes: 12 additions & 0 deletions babel.config.js
@@ -0,0 +1,12 @@
module.exports = {
presets: [
[
'@babel/preset-env',
{
targets: {
node: 'current'
}
}
]
]
};
5 changes: 4 additions & 1 deletion jest.config.js
@@ -1,5 +1,8 @@
module.exports = {
preset: 'ts-jest',
testEnvironment: 'node',
testRegex: '.spec.ts$'
testRegex: '.spec.ts$',
transform: {
'^.+\\.jsx?$': 'babel-jest'
}
};

0 comments on commit 51c8ac0

Please sign in to comment.