deno.land / x / ultra@v2.3.8 / tools / test-examples.ts

test-examples.ts
نووسراو ببینە
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
import { join } from "../lib/deps.ts";import { initExampleConfig } from "./dev.ts";
async function testExample(example: string) { try { const examplePath = join("examples", example); await initExampleConfig(example); const command = new Deno.Command(Deno.execPath(), { args: [ "test", "-c", "deno.dev.json", "-A", "--no-check", ], cwd: examplePath, env: { ULTRA_MODE: "development", }, }); const process = command.spawn();
console.log("test ", examplePath);
const status = await process.status; if (status.code > 0) { Deno.exit(status.code); } } catch (err) { console.error(err); Deno.exit(1); }}
if (import.meta.main) { for (const example of Deno.args) { await testExample(example); }}
ultra

Version Info

Tagged at
8 months ago