-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
some failing tests i wrote
src/index.test.ts
describe("handles validation for oneOf", () => {
it("returns true when the data is valid", () => {
const testSchema = {
oneOf: [{ type: "string" }, { type: "number" }],
} as JSONSchema;
const result = validator(testSchema, "potato") as any;
expect(result).toBe(true);
});
it("returns true when the data is null", () => {
const testSchema = {
oneOf: [{ type: "string" }, { type: "null" }],
} as JSONSchema;
const result = validator(testSchema, null) as any;
expect(result).toBe(true);
});
});Result
Metadata
Metadata
Assignees
Labels
No labels
