Skip to content

Commit

Permalink
labels
Browse files Browse the repository at this point in the history
  • Loading branch information
digitaldesigndj committed Aug 16, 2023
1 parent b261e91 commit c925b72
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 9 deletions.
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"deno.enable": true,
"deno.lint": true,
"deno.unstable": true,
"editor.formatOnSave": true,
"editor.defaultFormatter": "denoland.vscode-deno"
}
2 changes: 1 addition & 1 deletion deno.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"@/": "./",
"$fresh/": "https://deno.land/x/[email protected]/",
"$std/": "https://deno.land/[email protected]/",
"$icons/": "https://deno.land/x/[email protected].3/tsx/",
"$icons/": "https://deno.land/x/[email protected].4/tsx/",
"fresh_seo": "https://deno.land/x/[email protected]/mod.ts",
"fresh_marionette": "https://deno.land/x/[email protected]/mod.js",
"preact": "https://esm.sh/[email protected]",
Expand Down
10 changes: 2 additions & 8 deletions test/4_handler_test.ts → test/4_fetch_test_wrapper.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
// import { createHandler } from "$fresh/server.ts"
// import manifest from "@/fresh.gen.ts"
import { delay } from "$std/async/delay.ts"
import { startFreshServer } from "$fresh/tests/test_utils.ts"

import { BASE_URL } from "@/utils/config.js"
import { assert, assertEquals } from "$std/assert/mod.ts"
import { Status } from "$std/http/http_status.ts"
Expand All @@ -20,23 +17,20 @@ const myTestWrapper =
await delay(100)
}

export const fixtureTestWrapper = myTestWrapper([
export const fetchTestWrapper = myTestWrapper([
"run",
"-A",
"--unstable",
"./main.ts",
])

// import { wrapFetch } from "cookiejar";
// const fetch = wrapFetch();

Deno.test(
"The index page works",
{
sanitizeResources: false,
sanitizeOps: false,
},
fixtureTestWrapper(async (t: Deno.TestContext) => {
fetchTestWrapper(async (t: Deno.TestContext) => {
await t.step("The index page returns a 200 and a 'Welcome'", async () => {
const response = await fetch(`${BASE_URL}`)
assertEquals(response.status, Status.OK)
Expand Down

0 comments on commit c925b72

Please sign in to comment.