-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
The current usage example in github and npm, for the latest version v1.0.2, is:
const chai = require('chai')
const chaiJestDiff = require('chai-jest-diff')
chai.use(chaiJestDiff())This code does not work and it throws:
● Test suite failed to run
TypeError: _get__(...) is not a function
3 | const chaiJestDiff = require('chai-jest-diff');
4 |
> 5 | chai.use(chaiJestDiff());
| ^
6 | const { expect } = chai;
When using es module import in my code, this works:
import chai from 'chai';
import chaiJestDiff from 'chai-jest-diff';
const { expect } = chai;
chai.use(chaiJestDiff());However, when using require like in the example in the readme, I need to do this:
const chai = require('chai');
const chaiJestDiff = require('chai-jest-diff');
chai.use(chaiJestDiff.default());
const { expect } = chai;If nothing else, can the README please be updated so that others know how to use this module?
Metadata
Metadata
Assignees
Labels
No labels