Skip to content
Snippets Groups Projects
Commit 4935a516 authored by Tadeusz Miesiąc's avatar Tadeusz Miesiąc
Browse files

test(validatedatausingzodschema.ts): added missing test cases

parent 3a00598a
No related branches found
No related tags found
2 merge requests!223reset the pin numbers before search results are fetch (so the results will be...,!20Resolve MIN-57 "Feature/ connect drug search query"
import { z } from 'zod';
import { validateDataUsingZodSchema } from './validateDataUsingZodSchema';
const testObjectSchema = z.object({
name: z.string(),
});
const validObject = { name: 'John' };
const invalidObject = { name: 1234 };
describe('validateDataUsingZodSchema - utils', () => {
it('should return true for given cases', () => {
expect(validateDataUsingZodSchema(validObject, testObjectSchema)).toBe(true);
});
it('should return false for given cases', () => {
expect(validateDataUsingZodSchema(invalidObject, testObjectSchema)).toBe(false);
});
});
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment