Open ghost opened 6 years ago
The README is a bit wrong here.
If not using TypeScript, Babel will allow this (even though there is no default export).
import canvasSerializer from 'jest-canvas-snapshot-serializer';
TypeScript requires you to do it properly:
import * as canvasSerializer from 'jest-canvas-snapshot-serializer';
I've created a chart.js plugin that I now want to test. I'm running this as documented I get the following error:
TypeError: Cannot read property 'test' of undefined
Here is my test:
The plugin I'm testing: