Fix jest setup
This commit is contained in:
parent
aa0a29fefb
commit
b34bef899c
2 changed files with 3 additions and 7 deletions
|
|
@ -1,8 +1,9 @@
|
||||||
module.exports = api => {
|
module.exports = api => {
|
||||||
const isTest = api.env('test');
|
const isTest = api.env('test');
|
||||||
|
|
||||||
const preset = ["@babel/preset-env"];
|
const preset = ["@babel/preset-env"];
|
||||||
const testPreset = [
|
const testPreset = [
|
||||||
"@babel/preset-env", {targets: {node: 'current'}, modules: 'commonjs'}
|
"@babel/preset-env", { targets: { node: process.versions.node } }
|
||||||
];
|
];
|
||||||
|
|
||||||
const plugins = [
|
const plugins = [
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,6 @@
|
||||||
module.exports = {
|
module.exports = {
|
||||||
rootDir: 'src/newsreader/js/tests/',
|
roots: ['src/newsreader/js/tests/'],
|
||||||
testEnvironment: 'node',
|
|
||||||
|
|
||||||
clearMocks: true,
|
clearMocks: true,
|
||||||
coverageDirectory: 'coverage',
|
coverageDirectory: 'coverage',
|
||||||
|
|
||||||
transform: {
|
|
||||||
'\\.[jt]sx?$': 'babel-jest'
|
|
||||||
},
|
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue