Skip to content

Commit fddf857

Browse files
committed
fix: replace only with skip
1 parent 2f9297c commit fddf857

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

example.test.ts

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@ import { Elysia } from "elysia";
33
import { csrf } from "./src/index";
44

55
describe("Elysia CSRF Plugin", () => {
6-
test.only("should initialize plugin correctly", () => {
6+
test("should initialize plugin correctly", () => {
77
expect(() => {
88
new Elysia().use(csrf({ cookie: true }));
99
}).not.toThrow();
1010
});
1111

12-
test.only("should generate token and set cookie", async () => {
12+
test("should generate token and set cookie", async () => {
1313
const app = new Elysia()
1414
.use(
1515
csrf({
@@ -32,7 +32,7 @@ describe("Elysia CSRF Plugin", () => {
3232
expect(cookies).toContain("_csrf");
3333
});
3434

35-
test.only("should reject POST without token", async () => {
35+
test("should reject POST without token", async () => {
3636
const app = new Elysia()
3737
.use(csrf({ cookie: true }))
3838
.get("/token", ({ csrfToken }) => ({ token: csrfToken() }))
@@ -55,7 +55,7 @@ describe("Elysia CSRF Plugin", () => {
5555
expect(failRes.status).toBe(403);
5656
});
5757

58-
test.only("should reject POST with invalid token", async () => {
58+
test("should reject POST with invalid token", async () => {
5959
const app = new Elysia()
6060
.use(csrf({ cookie: true }))
6161
.get("/token", ({ csrfToken }) => ({ token: csrfToken() }))
@@ -78,7 +78,7 @@ describe("Elysia CSRF Plugin", () => {
7878
expect(invalidRes.status).toBe(403);
7979
});
8080

81-
test("should accept POST with valid token", async () => {
81+
test.skip("should accept POST with valid token", async () => {
8282
const app = new Elysia()
8383
.use(csrf({ cookie: true }))
8484
.get("/token", ({ csrfToken }) => ({ token: csrfToken() }))
@@ -104,7 +104,7 @@ describe("Elysia CSRF Plugin", () => {
104104
expect(data).toHaveProperty("success", true);
105105
});
106106

107-
test("should extract token from custom header", async () => {
107+
test.skip("should extract token from custom header", async () => {
108108
const app = new Elysia()
109109
.use(
110110
csrf({
@@ -143,7 +143,7 @@ describe("Elysia CSRF Plugin", () => {
143143
expect(successRes.status).toBe(200);
144144
});
145145

146-
test("should allow custom ignored methods", async () => {
146+
test.skip("should allow custom ignored methods", async () => {
147147
const app = new Elysia()
148148
.use(
149149
csrf({
@@ -166,7 +166,7 @@ describe("Elysia CSRF Plugin", () => {
166166
expect(getRes.status).toBe(200);
167167
});
168168

169-
test("should apply custom cookie configuration", async () => {
169+
test.skip("should apply custom cookie configuration", async () => {
170170
const app = new Elysia()
171171
.use(
172172
csrf({
@@ -191,7 +191,7 @@ describe("Elysia CSRF Plugin", () => {
191191
expect(cookies).toContain("SameSite=Strict");
192192
});
193193

194-
test("should allow token reuse across requests", async () => {
194+
test.skip("should allow token reuse across requests", async () => {
195195
const app = new Elysia()
196196
.use(csrf({ cookie: true }))
197197
.get("/token", ({ csrfToken }) => ({ token: csrfToken() }))
@@ -227,7 +227,7 @@ describe("Elysia CSRF Plugin", () => {
227227
expect(req2.status).toBe(200);
228228
});
229229

230-
test("should support multiple token sources", async () => {
230+
test.skip("should support multiple token sources", async () => {
231231
const app = new Elysia()
232232
.use(
233233
csrf({
@@ -279,7 +279,7 @@ describe("Elysia CSRF Plugin", () => {
279279
expect(headerRes.status).toBe(200);
280280
});
281281

282-
test("should work with HTML forms", async () => {
282+
test.skip("should work with HTML forms", async () => {
283283
const app = new Elysia()
284284
.use(csrf({ cookie: true }))
285285
.get("/form", ({ csrfToken }) => {
@@ -320,7 +320,7 @@ describe("Elysia CSRF Plugin", () => {
320320
expect(submitRes.status).toBe(200);
321321
});
322322

323-
test("should support SPA pattern", async () => {
323+
test.skip("should support SPA pattern", async () => {
324324
const app = new Elysia()
325325
.use(
326326
csrf({

0 commit comments

Comments
 (0)