(fixtureDir: string)
| 50 | } |
| 51 | |
| 52 | export async function prepareDevServer(fixtureDir: string) { |
| 53 | const tmp = await withTmpDir({ |
| 54 | dir: path.join(import.meta.dirname!, ".."), |
| 55 | prefix: "tmp_vite_", |
| 56 | }); |
| 57 | |
| 58 | await copyDir(fixtureDir, tmp.dir); |
| 59 | |
| 60 | await Deno.writeTextFile( |
| 61 | path.join(tmp.dir, "vite.config.ts"), |
| 62 | `import { defineConfig } from "vite"; |
| 63 | import { fresh } from "@fresh/plugin-vite"; |
| 64 | |
| 65 | export default defineConfig({ |
| 66 | plugins: [ |
| 67 | fresh(), |
| 68 | ], |
| 69 | }); |
| 70 | `, |
| 71 | ); |
| 72 | |
| 73 | return tmp; |
| 74 | } |
| 75 | |
| 76 | export async function launchDevServer( |
| 77 | dir: string, |
no test coverage detected