jest-zod
v1.0.1
Published
Zod schema matcher for jest
Downloads
320
Readme
jest-zod
Usage
it('should return data matching my schema', () => {
const result = functionUnderTest();
expect(result).toSatisfySchema(myZodSchema);
});
Setup
testSetup.js:
import zodMatchers from 'jest-zod';
expect.extend(zodMatchers);
package.json
"jest": {
"setupFilesAfterEnv": ["./testSetup.js"]
}