Content-Length: 224196 | pFad | http://github.com/PHS-TSA/webmaster-23-24/commit/e114ac1e1d98e19812c42aa997b8f6f04ae770b6

21 fix: tests · PHS-TSA/webmaster-23-24@e114ac1 · GitHub
Skip to content

Commit

Permalink
fix: tests
Browse files Browse the repository at this point in the history
  • Loading branch information
lishaduck committed Nov 6, 2024
1 parent c0980d3 commit e114ac1
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/utils/solutions.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { Schema } from "@effect/schema";
import { ParseResult, Schema } from "@effect/schema";
import { assertEquals, assertThrows } from "@std/assert";
import { ZodError } from "zod";
import { SolutionPagesSchema } from "./solutions.ts";

/**
@@ -27,10 +26,6 @@ Deno.test("Solution pages schema.", async (t: Deno.TestContext): Promise<void> =
});

await t.step("Invalid data", async (t): Promise<void> => {
await t.step("Empty", (): void => {
const actual = () => Schema.decodeUnknownSync(SolutionPagesSchema)([{}]);
assertThrows(actual, Error, "Required");
});
await t.step("Missing category", (): void => {
const actual = () =>
Schema.decodeUnknownSync(SolutionPagesSchema)([
@@ -41,7 +36,7 @@ Deno.test("Solution pages schema.", async (t: Deno.TestContext): Promise<void> =
},
},
]);
assertThrows(actual, ZodError, "Required");
assertThrows(actual, ParseResult.ParseError, "is missing");
});
});
});

0 comments on commit e114ac1

Please sign in to comment.








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/PHS-TSA/webmaster-23-24/commit/e114ac1e1d98e19812c42aa997b8f6f04ae770b6

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy