Skip to content

Commit

Permalink
test: ensure data in the provider before checking schema
Browse files Browse the repository at this point in the history
  • Loading branch information
dan-online committed Apr 28, 2024
1 parent aa3594a commit 2b77591
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/schema/tests/lib/SchemaMiddleware.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,8 @@ describe('SchemaMiddleware', () => {
});

test('GIVEN invalid value THEN throws', async () => {
await store.provider[Method.Set]({ method: Method.Set, errors: [], key: 'key', path: [], value: { str: 'test', num: 1, arr: [] } });

const payload = await schema[Method.Set]({ method: Method.Set, errors: [], key: 'key', path: [], value: { str: 1, num: 'test', arr: [] } });
const { method, key, path, errors } = payload;
const { context } = errors[0];
Expand Down

0 comments on commit 2b77591

Please sign in to comment.