Make test Context an ES6 module (#7142)

* Make test Context an ES6 module

* Address comments
This commit is contained in:
Ben McCann
2020-02-23 05:08:06 -08:00
committed by GitHub
parent 0d6c05cca0
commit f3ef620c68
2 changed files with 3 additions and 3 deletions

View File

@@ -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',

View File

@@ -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;