@lago-morph/create-prototype-app 0.1.1 → 0.2.0-rc02
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/package.json +1 -1
- package/skill/SKILL.md +9 -9
- package/skill/VERSION +1 -1
- package/skill/examples/notes-sql.md +1 -1
- package/skill/examples/secrets.md +20 -1
- package/skill/examples/tests.md +109 -0
- package/skill/reference/configuration.md +3 -3
- package/skill/reference/current-user.md +10 -10
- package/skill/reference/deploying.md +6 -6
- package/skill/reference/owner-tasks.md +46 -67
- package/skill/reference/testing/e2e.md +44 -0
- package/skill/reference/testing/failures.md +44 -0
- package/skill/reference/testing/fuzzing.md +28 -0
- package/skill/reference/testing/test-changes.md +42 -0
- package/skill/reference/testing.md +33 -22
- package/skill/reference/troubleshooting.md +12 -15
- package/skill/templates/README.md +1 -1
- package/skill/templates/production-stage.json +1 -3
- package/template/.claude/settings.json +9 -0
- package/template/README.md +21 -43
- package/template/package.json +7 -4
- package/template/playwright.config.ts +31 -0
- package/template/src/server/routes/notes.ts +1 -1
- package/template/src/server/signing.ts +4 -1
- package/template/tests/e2e/api/notes.spec.ts +74 -0
- package/template/tests/e2e/ui/account.spec.ts +22 -0
- package/template/tests/fuzz.test.ts +22 -0
- package/template/tests/signing.test.ts +16 -0
- package/template/tests/support/fuzz.test.ts +72 -0
- package/template/tests/support/fuzz.ts +88 -0
|
@@ -20,11 +20,14 @@ function toBase64url(bytes: Uint8Array): string {
|
|
|
20
20
|
function fromBase64url(text: string): Uint8Array<ArrayBuffer> | null {
|
|
21
21
|
if (!/^[A-Za-z0-9_-]+$/.test(text)) return null;
|
|
22
22
|
const base64 = text.replaceAll("-", "+").replaceAll("_", "/").padEnd(Math.ceil(text.length / 4) * 4, "=");
|
|
23
|
+
let bytes: Uint8Array<ArrayBuffer>;
|
|
23
24
|
try {
|
|
24
|
-
|
|
25
|
+
bytes = Uint8Array.from(atob(base64), (ch) => ch.charCodeAt(0));
|
|
25
26
|
} catch {
|
|
26
27
|
return null;
|
|
27
28
|
}
|
|
29
|
+
// atob ignores the unused low bits of the last character, so accept only the canonical spelling.
|
|
30
|
+
return toBase64url(bytes) === text ? bytes : null;
|
|
28
31
|
}
|
|
29
32
|
|
|
30
33
|
/** A token for `subject` that verifies until `expiresAt` (milliseconds since the epoch). */
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { expect, test, type APIRequestContext, type APIResponse } from "@playwright/test";
|
|
2
|
+
import type { NoteList } from "../../../src/shared/types";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* The notes flow end to end, through the HTTP API of a local `dev` server: a person signs in,
|
|
6
|
+
* writes notes and lists their own. Most of a flow's e2e cases are API tests like these.
|
|
7
|
+
*
|
|
8
|
+
* Edge cases, listed before the tests (the skill's reference/testing/e2e.md):
|
|
9
|
+
* - Boundaries: empty text and text of only spaces are refused; 500 characters are accepted; 501 are refused.
|
|
10
|
+
* - Text: Unicode text comes back unchanged; surrounding spaces are trimmed. Case, `..`, `/`,
|
|
11
|
+
* percent-encoding and prefix names do not apply: a note is free text, never a name or a path.
|
|
12
|
+
* - Order and time: not asserted here. Two notes made in the same millisecond tie on their time and
|
|
13
|
+
* fall back to their random IDs; there is no expiry.
|
|
14
|
+
* - Access: anonymous is refused (401); another user does not see the notes. Admin does not apply:
|
|
15
|
+
* the notes routes treat an admin as any user, and there is no admin view of notes.
|
|
16
|
+
* - Repetition: the same text twice makes two notes. Concurrent writes do not apply: each request
|
|
17
|
+
* inserts one row with a new ID, and the notes contract promises nothing about concurrency.
|
|
18
|
+
* - Failures: an unavailable database is simulated in-process only (`setUnavailable`, tests/app.test.ts).
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
/** Signs `request` in as a fresh mock user (local data is kept between runs) and returns its ID. */
|
|
22
|
+
async function signIn(request: APIRequestContext): Promise<string> {
|
|
23
|
+
const id = `e2e-${crypto.randomUUID()}`;
|
|
24
|
+
const res = await request.post("/api/auth/mock-login", { data: { level: "user", id } });
|
|
25
|
+
expect(res.status()).toBe(204);
|
|
26
|
+
return id;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
async function errorCode(res: APIResponse): Promise<string | undefined> {
|
|
30
|
+
const body: { error?: { code?: string } } = await res.json();
|
|
31
|
+
return body.error?.code;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
test("a signed-in user writes notes and lists only their own", async ({ request }) => {
|
|
35
|
+
await signIn(request);
|
|
36
|
+
const text = `Ünïcödé ✓ ${crypto.randomUUID()}`;
|
|
37
|
+
const created = await request.post("/api/notes", { data: { text: ` ${text} ` } });
|
|
38
|
+
expect(created.status()).toBe(201);
|
|
39
|
+
const again = await request.post("/api/notes", { data: { text } });
|
|
40
|
+
expect(again.status()).toBe(201);
|
|
41
|
+
|
|
42
|
+
const mineRes = await request.get("/api/notes");
|
|
43
|
+
expect(mineRes.status()).toBe(200);
|
|
44
|
+
const mine: NoteList = await mineRes.json();
|
|
45
|
+
expect(mine.notes.filter((n) => n.text === text)).toHaveLength(2);
|
|
46
|
+
|
|
47
|
+
// A new mock login replaces the session: now another user.
|
|
48
|
+
await signIn(request);
|
|
49
|
+
const theirsRes = await request.get("/api/notes");
|
|
50
|
+
expect(theirsRes.status()).toBe(200);
|
|
51
|
+
const theirs: NoteList = await theirsRes.json();
|
|
52
|
+
expect(theirs.notes.filter((n) => n.text === text)).toEqual([]);
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
test("anonymous requests are refused", async ({ request }) => {
|
|
56
|
+
const list = await request.get("/api/notes");
|
|
57
|
+
expect(list.status()).toBe(401);
|
|
58
|
+
expect(await errorCode(list)).toBe("AUTH.UNAUTHENTICATED");
|
|
59
|
+
const write = await request.post("/api/notes", { data: { text: "hello" } });
|
|
60
|
+
expect(write.status()).toBe(401);
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
test("note text must be 1 to 500 characters after trimming", async ({ request }) => {
|
|
64
|
+
await signIn(request);
|
|
65
|
+
for (const text of ["", " ", "x".repeat(501)]) {
|
|
66
|
+
const res = await request.post("/api/notes", { data: { text } });
|
|
67
|
+
expect(res.status(), JSON.stringify(text.slice(0, 20))).toBe(400);
|
|
68
|
+
expect(await errorCode(res)).toBe("HTTP.INVALID_INPUT");
|
|
69
|
+
}
|
|
70
|
+
expect((await request.post("/api/notes", { data: { text: "x".repeat(500) } })).status()).toBe(201);
|
|
71
|
+
const missing = await request.post("/api/notes", { data: {} });
|
|
72
|
+
expect(missing.status()).toBe(400);
|
|
73
|
+
expect(await errorCode(missing)).toBe("HTTP.INVALID_INPUT");
|
|
74
|
+
});
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { expect, test } from "@playwright/test";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* What only a browser shows: the home page renders the greeting, and the login button signs in
|
|
5
|
+
* (locally, the authentication mock's default user). Every other case is an API test (../api/).
|
|
6
|
+
*
|
|
7
|
+
* Edge cases, listed before the test (the skill's reference/testing/e2e.md): access is the one that
|
|
8
|
+
* applies here (anonymous sees "Log in", a signed-in user sees "Log out"); boundaries, text, order,
|
|
9
|
+
* repetition and failures are covered by the API and in-process tests.
|
|
10
|
+
*/
|
|
11
|
+
test("the login button signs in, and the page shows who is logged in", async ({ page }) => {
|
|
12
|
+
await page.goto("/");
|
|
13
|
+
await expect(page.getByRole("heading", { level: 1 })).toHaveText("Hello");
|
|
14
|
+
await expect(page.getByText("You are not logged in.")).toBeVisible();
|
|
15
|
+
|
|
16
|
+
await page.getByRole("button", { name: "Log in" }).click();
|
|
17
|
+
await expect(page.getByText(/^Logged in as .+ \(user\)\.$/)).toBeVisible();
|
|
18
|
+
await expect(page.getByRole("button", { name: "Log out" })).toBeVisible();
|
|
19
|
+
|
|
20
|
+
await page.getByRole("button", { name: "Log out" }).click();
|
|
21
|
+
await expect(page.getByText("You are not logged in.")).toBeVisible();
|
|
22
|
+
});
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { createTestApp, mockUsers, type TestApp } from "@lago-morph/prototype-framework/testing";
|
|
2
|
+
import { afterEach, describe, it } from "vitest";
|
|
3
|
+
import app from "../src/app";
|
|
4
|
+
import { newNote } from "../src/server/routes/notes";
|
|
5
|
+
import { fuzzJsonRoute } from "./support/fuzz";
|
|
6
|
+
|
|
7
|
+
let opened: TestApp | undefined;
|
|
8
|
+
afterEach(async () => {
|
|
9
|
+
await opened?.dispose();
|
|
10
|
+
opened = undefined;
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
describe("fuzz: POST /api/notes", () => {
|
|
14
|
+
// Why this route: its body is user text at a trust boundary, trimmed and length-limited, where
|
|
15
|
+
// whitespace-only, Unicode and boundary lengths are easy to miss in example tests.
|
|
16
|
+
// Why 150 runs and seed 20261031: enough to reach the trimmed and length boundaries the helper
|
|
17
|
+
// generates, in about a second per dialect; the fixed seed makes every run the same.
|
|
18
|
+
it("never answers a server error, and refuses exactly the bodies its schema refuses", async () => {
|
|
19
|
+
opened = await createTestApp(app, { user: mockUsers.user("fuzz") });
|
|
20
|
+
await fuzzJsonRoute(opened, { path: "/api/notes", schema: newNote, examples: [{ text: "a note" }], numRuns: 150, seed: 20261031 });
|
|
21
|
+
});
|
|
22
|
+
});
|
|
@@ -27,6 +27,22 @@ describe("signed tokens (HMAC, base64url)", () => {
|
|
|
27
27
|
}
|
|
28
28
|
});
|
|
29
29
|
|
|
30
|
+
// root cause 2026-10-31-G-template-signing-noncanonical: a 32-byte signature is 43 base64url
|
|
31
|
+
// characters, so its last character carries 2 unused bits; only the issued spelling may verify.
|
|
32
|
+
it("accepts only the issued spelling of a signature, not one re-spelled in its last character", async () => {
|
|
33
|
+
const alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_";
|
|
34
|
+
const token = await signToken(key, "note-1", Date.now() + 60_000);
|
|
35
|
+
const [subject = "", expiresAt = "", signature = ""] = token.split(".");
|
|
36
|
+
expect(signature).toHaveLength(43);
|
|
37
|
+
const last = alphabet.indexOf(signature.slice(-1));
|
|
38
|
+
expect(last % 4, "the issued spelling leaves the unused low bits at zero").toBe(0);
|
|
39
|
+
for (const flip of [1, 2, 3]) {
|
|
40
|
+
const respelled = signature.slice(0, -1) + (alphabet[last ^ flip] ?? "");
|
|
41
|
+
expect(await verifyToken(key, `${subject}.${expiresAt}.${respelled}`), respelled.slice(-3)).toBeNull();
|
|
42
|
+
}
|
|
43
|
+
expect(await verifyToken(key, token)).toBe("note-1");
|
|
44
|
+
});
|
|
45
|
+
|
|
30
46
|
it("refuses a token once it has expired", async () => {
|
|
31
47
|
vi.useFakeTimers();
|
|
32
48
|
vi.setSystemTime(new Date("2026-01-01T00:00:00Z"));
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { z } from "@lago-morph/prototype-framework";
|
|
2
|
+
import { describe, expect, it } from "vitest";
|
|
3
|
+
import { fuzzJsonRoute, type Requester } from "./fuzz";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* The fuzz helper's own tests: fake routes that answer by rule, so each way a route can break the
|
|
7
|
+
* helper's oracle is shown to fail the run, and a correct route is shown to pass. Small runs with a
|
|
8
|
+
* fixed seed: these check the helper, not a route.
|
|
9
|
+
*/
|
|
10
|
+
const schema = z.object({ text: z.string().trim().min(1).max(20) });
|
|
11
|
+
const RUNS = { numRuns: 100, seed: 7 };
|
|
12
|
+
|
|
13
|
+
function route(answer: (body: unknown, valid: boolean) => Response): Requester {
|
|
14
|
+
return {
|
|
15
|
+
async request(_path, init) {
|
|
16
|
+
const raw = typeof init?.body === "string" ? init.body : "";
|
|
17
|
+
let body: unknown;
|
|
18
|
+
try {
|
|
19
|
+
body = JSON.parse(raw);
|
|
20
|
+
} catch {
|
|
21
|
+
return Response.json({ error: { code: "HTTP.INVALID_INPUT" } }, { status: 400 });
|
|
22
|
+
}
|
|
23
|
+
return answer(body, schema.safeParse(body).success);
|
|
24
|
+
},
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
const invalidInput = (): Response => Response.json({ error: { code: "HTTP.INVALID_INPUT", message: "bad" } }, { status: 400 });
|
|
29
|
+
const created = (): Response => Response.json({ id: "n1" }, { status: 201 });
|
|
30
|
+
|
|
31
|
+
describe("fuzzJsonRoute", () => {
|
|
32
|
+
it("passes a route that refuses exactly the bodies its schema refuses", async () => {
|
|
33
|
+
await expect(fuzzJsonRoute(route((_b, valid) => (valid ? created() : invalidInput())), { path: "/api/x", schema, examples: [{ text: "hi" }], ...RUNS })).resolves.toBeUndefined();
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
it("passes when the route's own rules refuse a schema-valid body with another status", async () => {
|
|
37
|
+
await expect(fuzzJsonRoute(route((_b, valid) => (valid ? Response.json({ error: { code: "HTTP.CONFLICT" } }, { status: 409 }) : invalidInput())), { path: "/api/x", schema, examples: [{ text: "hi" }], ...RUNS })).resolves.toBeUndefined();
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
it("fails a route that answers a server error", async () => {
|
|
41
|
+
const r = route((body, valid) => (Array.isArray(body) ? new Response("boom", { status: 500 }) : valid ? created() : invalidInput()));
|
|
42
|
+
await expect(fuzzJsonRoute(r, { path: "/api/x", schema, examples: [{ text: "hi" }], ...RUNS })).rejects.toThrow(/500/);
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
it("fails a route that accepts a body its schema refuses", async () => {
|
|
46
|
+
await expect(fuzzJsonRoute(route(() => created()), { path: "/api/x", schema, examples: [{ text: "hi" }], ...RUNS })).rejects.toThrow(/schema refuses/);
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
it("fails a route that answers HTTP.INVALID_INPUT for a body its schema accepts", async () => {
|
|
50
|
+
await expect(fuzzJsonRoute(route(() => invalidInput()), { path: "/api/x", schema, examples: [{ text: "hi" }], ...RUNS })).rejects.toThrow(/schema accepts/);
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
it("sends the method and path given, as JSON", async () => {
|
|
54
|
+
const seen: string[] = [];
|
|
55
|
+
const correct = route((_b, valid) => (valid ? created() : invalidInput()));
|
|
56
|
+
const r: Requester = {
|
|
57
|
+
request(path, init) {
|
|
58
|
+
seen.push(`${init?.method ?? "GET"} ${path} ${new Headers(init?.headers).get("content-type") ?? ""}`);
|
|
59
|
+
return correct.request(path, init);
|
|
60
|
+
},
|
|
61
|
+
};
|
|
62
|
+
await fuzzJsonRoute(r, { path: "/api/y", method: "PUT", schema, examples: [{ text: "hi" }], numRuns: 5, seed: 1 });
|
|
63
|
+
expect(new Set(seen)).toEqual(new Set(["PUT /api/y application/json"]));
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
it("refuses an example the schema refuses, before sending anything", async () => {
|
|
67
|
+
const seen: string[] = [];
|
|
68
|
+
const r: Requester = { request: (path) => (seen.push(path), Promise.resolve(created())) };
|
|
69
|
+
await expect(fuzzJsonRoute(r, { path: "/api/x", schema, examples: [{ text: "" }], ...RUNS })).rejects.toThrow(/example .* is refused by the schema/);
|
|
70
|
+
expect(seen).toEqual([]);
|
|
71
|
+
});
|
|
72
|
+
});
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import type { z } from "@lago-morph/prototype-framework";
|
|
2
|
+
import fc from "fast-check";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* A small fuzz helper for a JSON route, driven by the route's own zod schema (the skill's
|
|
6
|
+
* reference/testing/fuzzing.md). Use it only on a route whose input sits at a trust boundary and
|
|
7
|
+
* whose example tests keep missing cases, never on every route. It sends generated bodies, any
|
|
8
|
+
* JSON value and changed copies of valid examples, and checks each answer against the schema:
|
|
9
|
+
* - never a server error (5xx);
|
|
10
|
+
* - a body the schema refuses gets 400 `HTTP.INVALID_INPUT`;
|
|
11
|
+
* - a body the schema accepts never gets `HTTP.INVALID_INPUT` (the route's own rules may still
|
|
12
|
+
* refuse it, for example with 404 or 409).
|
|
13
|
+
* A failure names the seed and the smallest failing body; add that body as a plain example test.
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
/** What the helper needs from a test app: `createTestApp`'s `request`. */
|
|
17
|
+
export interface Requester {
|
|
18
|
+
request(path: string, init?: RequestInit): Promise<Response>;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export interface FuzzJsonRouteOptions {
|
|
22
|
+
/** The route's path, with `/api`. */
|
|
23
|
+
readonly path: string;
|
|
24
|
+
/** Default POST. */
|
|
25
|
+
readonly method?: "POST" | "PUT" | "PATCH";
|
|
26
|
+
/** The schema the route passes to `jsonBody(…)`. */
|
|
27
|
+
readonly schema: z.ZodType;
|
|
28
|
+
/** At least one body the schema accepts; generated bodies change these. */
|
|
29
|
+
readonly examples: readonly [unknown, ...unknown[]];
|
|
30
|
+
/** Runs and fixed seed: state both at the call, with a one-line reason. Keep runs small. */
|
|
31
|
+
readonly numRuns: number;
|
|
32
|
+
readonly seed: number;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/** A value for one field: any JSON value, or a string near the usual length limits. */
|
|
36
|
+
const fieldValue: fc.Arbitrary<unknown> = fc.oneof(
|
|
37
|
+
fc.jsonValue(),
|
|
38
|
+
fc.string({ unit: "grapheme", maxLength: 600 }),
|
|
39
|
+
fc.nat({ max: 600 }).map((n) => " ".repeat(n)),
|
|
40
|
+
fc.constantFrom("", " ", "\u00a0", "\u200b", "a".repeat(500), "a".repeat(501)),
|
|
41
|
+
);
|
|
42
|
+
|
|
43
|
+
function isRecord(value: unknown): value is Record<string, unknown> {
|
|
44
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/** A copy of `example` with one field replaced, removed or added; other values unchanged. */
|
|
48
|
+
function changed(example: unknown): fc.Arbitrary<unknown> {
|
|
49
|
+
if (!isRecord(example)) return fc.oneof(fc.constant(example), fieldValue);
|
|
50
|
+
const keys = Object.keys(example);
|
|
51
|
+
const replaced = fc.tuple(fc.constantFrom(...keys, "extra"), fieldValue).map(([key, value]) => ({ ...example, [key]: value }));
|
|
52
|
+
if (keys.length === 0) return replaced;
|
|
53
|
+
const removed = fc.constantFrom(...keys).map((key) => Object.fromEntries(Object.entries(example).filter(([k]) => k !== key)));
|
|
54
|
+
return fc.oneof(replaced, removed);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
async function errorCode(res: Response): Promise<string | undefined> {
|
|
58
|
+
try {
|
|
59
|
+
const body: { error?: { code?: string } } = await res.json();
|
|
60
|
+
return body.error?.code;
|
|
61
|
+
} catch {
|
|
62
|
+
return undefined;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export async function fuzzJsonRoute(app: Requester, options: FuzzJsonRouteOptions): Promise<void> {
|
|
67
|
+
const { path, method = "POST", schema, examples, numRuns, seed } = options;
|
|
68
|
+
// A wrong example would leave the "never INVALID_INPUT for an accepted body" check untested.
|
|
69
|
+
for (const example of examples) {
|
|
70
|
+
if (!(await schema.safeParseAsync(example)).success) throw new Error(`fuzzJsonRoute: the example ${JSON.stringify(example)} is refused by the schema; give bodies it accepts`);
|
|
71
|
+
}
|
|
72
|
+
const body = fc.oneof(fc.constantFrom(...examples), fc.constantFrom(...examples).chain(changed), fc.jsonValue());
|
|
73
|
+
await fc.assert(
|
|
74
|
+
fc.asyncProperty(body, async (value) => {
|
|
75
|
+
const sent = JSON.stringify(value);
|
|
76
|
+
// The route sees what JSON.parse gives back, so judge that, not the generated value.
|
|
77
|
+
const accepted = (await schema.safeParseAsync(JSON.parse(sent))).success;
|
|
78
|
+
const res = await app.request(path, { method, headers: { "content-type": "application/json" }, body: sent });
|
|
79
|
+
if (res.status >= 500) throw new Error(`${method} ${path} answered ${String(res.status)} for ${sent}`);
|
|
80
|
+
const code = await errorCode(res);
|
|
81
|
+
if (!accepted && !(res.status === 400 && code === "HTTP.INVALID_INPUT")) {
|
|
82
|
+
throw new Error(`${method} ${path} answered ${String(res.status)} ${code ?? ""} for a body the schema refuses: ${sent}`);
|
|
83
|
+
}
|
|
84
|
+
if (accepted && code === "HTTP.INVALID_INPUT") throw new Error(`${method} ${path} answered HTTP.INVALID_INPUT for a body the schema accepts: ${sent}`);
|
|
85
|
+
}),
|
|
86
|
+
{ numRuns, seed, includeErrorInReport: true },
|
|
87
|
+
);
|
|
88
|
+
}
|