rivet
Version:
Suite of utilities for working with the Rivet consumer-driven API contacts testing model.
16 lines (12 loc) • 363 B
text/typescript
import { matchers } from 'jest-json-schema';
import { jwt } from '../../src/types';
expect.extend(matchers);
describe('types.jwt', () => {
it('matches jwt format', () => {
const schema = {
required: ['token'],
properties: { token: jwt },
};
expect({ token: 'ABC3EFGH.IJKLMN7PQRSTU.VWXYZ1234567890' }).toMatchSchema(schema);
});
});