-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ad11dfb
commit 3a3c854
Showing
4 changed files
with
35 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,12 +11,15 @@ | |
"jsxImportSource": "preact" | ||
}, | ||
"fmt": { | ||
"semiColons": false | ||
"semiColons": false, | ||
"exclude": [ | ||
"_fresh" | ||
] | ||
}, | ||
"lock": false, | ||
"imports": { | ||
"@/": "./", | ||
"$fresh/": "https://deno.land/x/[email protected].1/", | ||
"$fresh/": "https://deno.land/x/[email protected].2/", | ||
"$std/": "https://deno.land/[email protected]/", | ||
"$icons/": "https://deno.land/x/[email protected]/tsx/", | ||
"fresh_seo": "https://deno.land/x/[email protected]/mod.ts", | ||
|
@@ -39,6 +42,9 @@ | |
"fresh", | ||
"recommended" | ||
] | ||
} | ||
}, | ||
"exclude": [ | ||
"_fresh" | ||
] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { delay } from "$std/async/delay.ts" | ||
import { startFreshServer } from "$fresh/tests/test_utils.ts" | ||
|
||
const myTestWrapper = | ||
(args: string[]) => (theTests: any) => async (t: Deno.TestContext) => { | ||
const { serverProcess, lines } = await startFreshServer({ | ||
args, | ||
}) | ||
await theTests(t) | ||
// Stop the Server | ||
await lines.cancel() | ||
serverProcess.kill("SIGTERM") | ||
// await for the server to close | ||
await delay(100) | ||
} | ||
|
||
export const fetchTestWrapper = myTestWrapper([ | ||
"run", | ||
"-A", | ||
"--unstable", | ||
"./main.ts", | ||
]) |