Skip to content

Commit 6f4a65b

Browse files
committed
test update
1 parent 58a5196 commit 6f4a65b

File tree

1 file changed

+1
-28
lines changed

1 file changed

+1
-28
lines changed

tests/test.ts

Lines changed: 1 addition & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
11
import { createHandler, ServeHandlerInfo } from "$fresh/server.ts";
22
import manifest from "./work/fresh.gen.ts";
3-
import config, { connectionPool } from "./config/test_fresh.config.ts";
3+
import config from "./config/test_fresh.config.ts";
44
import { expect } from "./test_deps.ts";
55

66
const CONN_INFO: ServeHandlerInfo = {
77
remoteAddr: { hostname: "127.0.0.1", port: 53496, transport: "tcp" },
88
};
99

1010
Deno.test("Response Test", async (t) => {
11-
// const handler = await createHandler(manifest, config);
12-
1311
await t.step("No login => Redirect", async () => {
1412
const handler = await createHandler(manifest, config);
1513
let resp = await handler(
@@ -44,31 +42,6 @@ Deno.test("Response Test", async (t) => {
4442
const text = await resp.text();
4543
expect(text.includes('href="/user/login"')).toBe(true);
4644
});
47-
//
48-
//
49-
// await t.step("Not Work Session(incorrect cookie)", async () => {
50-
// let resp = await handler(
51-
// new Request("http://127.0.0.1/session"),
52-
// CONN_INFO,
53-
// );
54-
// assertEquals(resp.status, 200);
55-
//
56-
// let text = await resp.text();
57-
// assertEquals(text.includes("<p>count:0</p>"), true);
58-
//
59-
// const sessionKey =
60-
// (resp.headers.get("set-cookie")!).split("session=")[1].split(";")[0];
61-
//
62-
// resp = await handler(
63-
// new Request("http://127.0.0.1/session", {
64-
// headers: { cookie: `session=${sessionKey}AA` },
65-
// }),
66-
// CONN_INFO,
67-
// );
68-
// assertEquals(resp.status, 200);
69-
// text = await resp.text();
70-
// assertEquals(text.includes("<p>count:0</p>"), true);
71-
// });
7245
});
7346

7447
await Deno.test(

0 commit comments

Comments
 (0)