From a4becba177b323c274a9c9a80beab187eb98b28a Mon Sep 17 00:00:00 2001 From: Milan Suk Date: Wed, 25 Sep 2024 18:07:26 +0200 Subject: [PATCH] test: update --- packages/effect-http-node/test/client.test.ts | 2 +- packages/effect-http-node/test/handler.test.ts | 10 +++++----- packages/effect-http/test/openapi.test.ts | 10 +++++----- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/packages/effect-http-node/test/client.test.ts b/packages/effect-http-node/test/client.test.ts index 5f0e219c7..f53eefeff 100644 --- a/packages/effect-http-node/test/client.test.ts +++ b/packages/effect-http-node/test/client.test.ts @@ -157,7 +157,7 @@ it.scoped( ) expect(result.message).toEqual( - "Failed to encode headers. Expected { readonly another-header: string; readonly x-my-header: NumberFromString }, actual undefined" + "Failed to encode headers. Expected { readonly x-my-header: NumberFromString; readonly another-header: string }, actual undefined" ) expect(result.side).toEqual("client") diff --git a/packages/effect-http-node/test/handler.test.ts b/packages/effect-http-node/test/handler.test.ts index 94de2f227..ba29784aa 100644 --- a/packages/effect-http-node/test/handler.test.ts +++ b/packages/effect-http-node/test/handler.test.ts @@ -302,10 +302,10 @@ describe("error reporting", () => { expect(yield* response.json).toEqual({ error: "Request validation error", location: "query", - message: `{ readonly another: string; readonly value: "x" | "y" } -├─ ["another"] + message: `{ readonly value: \"x\" | \"y\"; readonly another: string } +├─ ["value"] │ └─ is missing -└─ ["value"] +└─ ["another"] └─ is missing` }) })) @@ -319,8 +319,8 @@ describe("error reporting", () => { expect(yield* response.json).toEqual({ error: "Request validation error", location: "query", - message: `{ readonly another: string; readonly value: "x" | "y" } -└─ ["another"] + message: `{ readonly value: \"x\" | \"y\"; readonly another: string } +└─ ["value"] └─ is missing` }) })) diff --git a/packages/effect-http/test/openapi.test.ts b/packages/effect-http/test/openapi.test.ts index 97560b00d..c591556b3 100644 --- a/packages/effect-http/test/openapi.test.ts +++ b/packages/effect-http/test/openapi.test.ts @@ -664,7 +664,7 @@ describe("data types", () => { expect(OpenApi.makeSchema(schema)).toStrictEqual({ type: "string", - description: "a string" + description: "a string that will be parsed into a number" }) }) }) @@ -815,7 +815,7 @@ describe("objects", () => { id: { type: "integer", description: "an integer" }, name: { type: "string", description: "a string" } }, - required: ["name", "id"] + required: ["id", "name"] }) }) @@ -842,7 +842,7 @@ describe("objects", () => { name: { type: "string", description: "a string" }, username: { type: "string", description: "a string" } }, - required: ["username", "id"] + required: ["id", "username"] }) }) @@ -863,7 +863,7 @@ describe("objects", () => { name: { description: "a string", type: "string" }, username: { description: "a string", type: "string" } }, - required: ["username", "id"] + required: ["id", "username"] }) }) }) @@ -971,7 +971,7 @@ describe("description annotation", () => { id: { type: "integer", description: "id description" }, name: { type: "string", enum: ["value"], description: "value description" } }, - required: ["name", "id"], + required: ["id", "name"], description: "my description" }) })