From f3ef620c6876ad13188f5c95f65b010952d219ea Mon Sep 17 00:00:00 2001 From: Ben McCann <322311+benmccann@users.noreply.github.com> Date: Sun, 23 Feb 2020 05:08:06 -0800 Subject: [PATCH] Make test Context an ES6 module (#7142) * Make test Context an ES6 module * Address comments --- karma.conf.js | 2 +- test/context.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) 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; -- 2.47.2