diff --git a/karma.conf.js b/karma.conf.js index 8fc9bfa52..2f115617e 100644 --- a/karma.conf.js +++ b/karma.conf.js @@ -68,7 +68,7 @@ module.exports = function(karma) { plugins: [ resolve(), babel({exclude: 'node_modules/**'}), // use babel since we have ES proposal features - commonjs() + commonjs({exclude: ['src/**', 'test/**']}) ], output: { name: 'test', diff --git a/test/context.js b/test/context.js index 42b399d9f..d37324f28 100644 --- a/test/context.js +++ b/test/context.js @@ -1,5 +1,5 @@ // Code from https://stackoverflow.com/questions/4406864/html-canvas-unit-testing -var Context = function() { +const Context = function() { this._calls = []; // names/args of recorded calls this._initMethods(); @@ -136,4 +136,4 @@ Context.prototype.resetCalls = function() { this._calls = []; }; -module.exports = Context; +export default Context;