1.0.0 • Published 3 years ago
@putout/plugin-jest v1.0.0
@putout/plugin-jest
jest
plugin helps to migrate to latest jest API.
Install
npm i @putout/plugin-jest -D
Rules
{
"rules": {
"jest": "on"
}
}
❌ Incorrect code example
jest.addMatchers({
fail: (a, b, c) => {
return {
pass: false,
};
},
});
jest.resetModuleRegistry();
jest.runTimersToTime(1000);
✅ Correct code Example
expect.extend({
fail: (a, b, c) => {
return {
pass: false,
};
},
});
jest.resetModules();
jest.advanceTimersByTime(1000);
License
MIT
1.0.0
3 years ago