Skip to content

Commit

Permalink
fix(coverage): must account for undefined refs
Browse files Browse the repository at this point in the history
  • Loading branch information
jharlow committed Oct 15, 2024
1 parent 1abb8bc commit 0acfc8b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/zodOneFieldSchema.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import { zodOneFieldSchema } from "../src";

const mockLogger = mock<Logger>();
const mockOpts = { logger: mockLogger };
const mockRefs = { currentPath: ["hello"] };

describe("zodOneFieldSchema", () => {
enum TestEnum {
Expand All @@ -31,7 +30,7 @@ describe("zodOneFieldSchema", () => {
"should return a schema for valid $_def.typeName type",
(schema) => {
// Assemble
const onefield = zodOneFieldSchema(schema, mockRefs, mockOpts);
const onefield = zodOneFieldSchema(schema, undefined, mockOpts);

// Act
expect(onefield).toBeDefined();
Expand Down Expand Up @@ -70,7 +69,8 @@ describe("zodOneFieldSchema", () => {
"should throw an error if invalid $_def.typeName types are used",
(schema) => {
// Act
const managedEffect = () => zodOneFieldSchema(schema, mockRefs, mockOpts);
const managedEffect = () =>
zodOneFieldSchema(schema, undefined, mockOpts);

// Assert
expect(managedEffect).toThrowError(
Expand Down

0 comments on commit 0acfc8b

Please sign in to comment.