* Make test Context an ES6 module
* Address comments
plugins: [
resolve(),
babel({exclude: 'node_modules/**'}), // use babel since we have ES proposal features
- commonjs()
+ commonjs({exclude: ['src/**', 'test/**']})
],
output: {
name: 'test',
// 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();
this._calls = [];
};
-module.exports = Context;
+export default Context;