Skip to content

Commit b3a80b5

Browse files
committed
Fix karma
1 parent 158e15b commit b3a80b5

File tree

5 files changed

+515
-40
lines changed

5 files changed

+515
-40
lines changed

.babelrc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"presets": [
3+
["@babel/env"]
4+
]
5+
}

babel.config.js

Lines changed: 0 additions & 7 deletions
This file was deleted.

karma.conf.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
const babel = require('rollup-plugin-babel');
2-
const { default: babelrc } = require('babelrc-rollup');
32
const commonjs = require('rollup-plugin-commonjs');
43
const resolve = require('rollup-plugin-node-resolve');
54

65
module.exports = function karmaConfig(config) {
76
config.set({
87
frameworks: ['jasmine'],
98
files: [
10-
'src/index.test.js',
9+
{ pattern: 'src/index.test.js', watched: false },
1110
],
1211
preprocessors: {
1312
'**/*.test.js': ['rollup'],
@@ -24,7 +23,12 @@ module.exports = function karmaConfig(config) {
2423
extensions: ['.mjs', '.js', '.json', '.node'],
2524
}),
2625
commonjs(),
27-
babel(babelrc()),
26+
babel({
27+
presets: [
28+
['@babel/preset-env', { modules: false }],
29+
],
30+
babelrc: false,
31+
}),
2832
],
2933
},
3034
reporters: ['mocha'],

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@
2323
},
2424
"devDependencies": {
2525
"@babel/core": "^7.4.5",
26+
"@babel/plugin-external-helpers": "^7.0.0",
2627
"@babel/preset-env": "^7.4.5",
28+
"babel-core": "^7.0.0-bridge.0",
2729
"babel-eslint": "^10.0.0",
28-
"babel-jest": "^24.0.0",
29-
"babel-plugin-external-helpers": "^6.0.0",
30-
"babelrc-rollup": "^3.0.0",
30+
"babel-jest": "^23.4.2",
3131
"bowser": "^2.0.0",
3232
"eslint": "^5.0.0",
3333
"eslint-config-airbnb-base": "^13.0.0",
@@ -44,7 +44,7 @@
4444
"karma-rollup-preprocessor": "^7.0.0",
4545
"karma-safari-launcher": "^1.0.0",
4646
"rollup": "^1.0.0",
47-
"rollup-plugin-babel": "^4.0.0",
47+
"rollup-plugin-babel": "^4.0.1",
4848
"rollup-plugin-commonjs": "^10.0.0",
4949
"rollup-plugin-node-resolve": "^5.0.0"
5050
},

0 commit comments

Comments
 (0)