Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
ariskemper committed Feb 12, 2024
1 parent 0825378 commit 1e2e2c6
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions library/src/schemas/string/string.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,17 +74,18 @@ describe('string', () => {
describe('schema pipeline', () => {
const schema1 = string([minLength(2), maxLength(3)]);

test('should contain invalid length message, type and requirements', () => {
test('should expose the pipeline', () => {
console.log(schema1.pipe);
expect(schema1.pipe).toStrictEqual([
expect.objectContaining({
type: 'min_length',
expects: '>=2',
requirement: 2,
message: 'Invalid length',
}),
expect.objectContaining({
type: 'max_length',
expects: '<=3',
requirement: 3,
message: 'Invalid length',
}),
]);
});
Expand Down

0 comments on commit 1e2e2c6

Please sign in to comment.