(dir: string)
| 11 | import { withTmpDir, writeFiles } from "../../fresh/src/test_utils.ts"; |
| 12 | |
| 13 | async function readFiles(dir: string): Promise<Record<string, string>> { |
| 14 | const files: Record<string, string> = {}; |
| 15 | |
| 16 | for await ( |
| 17 | const entry of walk(dir, { includeDirs: false, includeFiles: true }) |
| 18 | ) { |
| 19 | const pathname = path.relative(dir, entry.path); |
| 20 | const content = await Deno.readTextFile(entry.path); |
| 21 | files[`/${pathname.replaceAll(/[\\]+/g, "/")}`] = content.trim(); |
| 22 | } |
| 23 | |
| 24 | return files; |
| 25 | } |
| 26 | |
| 27 | Deno.test("update - remove JSX pragma import", async () => { |
| 28 | await using _tmp = await withTmpDir(); |
no test coverage detected