I'm currently trying to implement simple tests for my JavaScript components and I am getting the error: TypeError: undefined is not a function
from my test.
This is erroring on this line within my class:
this.options = Object.assign({}, this.defaults, options);
this.defaults
is an object of default options and options
is currently an object with nothing in.
I am running the code from CLI using npm test
which resolves to this: mocha ./src/components/myComponent/myComponent.spec.js --compilers js:babel-register
Does anyone know why this error occurs?
Aucun commentaire:
Enregistrer un commentaire