deno.land / std@0.139.0 / _deno_unstable_test.ts

_deno_unstable_test.ts
View Documentation
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
// Copyright 2018-2022 the Deno authors. All rights reserved. MIT license.import { assertEquals } from "./testing/asserts.ts";
Deno.test({ name: "_deno_unstable.ts complies with --unstable if type checked", async fn() { const denoUnstableUrl = new URL("_deno_unstable.ts", import.meta.url); const denoUnstableCheckedUrl = new URL( "_deno_unstable_checked.ts", import.meta.url, ); const code = await Deno.readTextFile(denoUnstableUrl); const checkedCode = `// AUTOGENERATED\n${code.replace("@ts-nocheck ", "")}`; try { await Deno.writeTextFile(denoUnstableCheckedUrl, checkedCode); const process = Deno.run({ cmd: [ Deno.execPath(), "run", "--quiet", "--unstable", denoUnstableCheckedUrl.href, ], }); const status = await process.status(); process.close(); assertEquals(status.code, 0); } finally { // TODO(nayeemrmn): Uncomment (https://github.com/denoland/deno_std/pull/1819#issuecomment-1011136991). // await Deno.remove(denoUnstableCheckedUrl, {}).catch(() => {}); } },});
std
Deno standard library
GitHub Repositorydenoland/deno_std
GitHub Stars
2108

Version Info

Tagged at
4 days ago