Skip to content

Commit 570b2dc

Browse files
committed
toBe instead of toContain
1 parent 3b094ff commit 570b2dc

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed

packages/tests-e2e/tests/appRouter/methods.test.ts

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -80,15 +80,8 @@ test.describe("all supported methods should work in route handlers", () => {
8080
});
8181
expect(optionsRes.status()).toEqual(204);
8282
const headers = optionsRes.headers();
83-
expect(headers.allow).toContain("GET");
84-
expect(headers.allow).toContain("HEAD");
85-
expect(headers.allow).toContain("POST");
86-
expect(headers.allow).toContain("PUT");
87-
expect(headers.allow).toContain("PATCH");
88-
expect(headers.allow).toContain("DELETE");
89-
expect(headers.allow).toContain("OPTIONS");
90-
expect(headers.allow).toContain("LOVE");
91-
expect(headers.special).toContain("OpenNext is the best :) :] :> :D");
83+
expect(headers.allow).toBe("GET, HEAD, POST, PUT, PATCH, DELETE, OPTIONS, LOVE");
84+
expect(headers.special).toBe("OpenNext is the best :) :] :> :D");
9285
});
9386
});
9487

@@ -160,7 +153,7 @@ test("should be able to set cookies in route handler", async ({ request }) => {
160153
const postData = await postRes.json();
161154
expect(postData.message).toBe("ok");
162155
const cookies = postRes.headers()["set-cookie"];
163-
expect(cookies).toContain("auth_session=SUPER_SECRET_SESSION_ID_1234");
156+
expect(cookies).toBe("auth_session=SUPER_SECRET_SESSION_ID_1234");
164157
});
165158

166159
test("should be able to redirect in route handler", async ({ request }) => {

0 commit comments

Comments
 (0)