This package adds code and script matchers to Jest.
This package is available on npm as jest-extended-code
.
npm install -D jest jest-extended-code
In your Jest configuration file (e.g. jest.config.ts
), add the matcher to the setupFilesAfterEnv
setting.
const config = {
setupFilesAfterEnv = ['jest-extended-code/matchers/toOutput.js']
};
Follow the "Individual Matchers" instructions above using jest-extended-code
instead of any specific matcher.
const config = {
setupFilesAfterEnv = ['jest-extended-code']
};
.toEqualCode()
.toOutput()
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.
This package is licensed under the MIT License.