summaryrefslogtreecommitdiff
path: root/cli/tests/lib_runtime_api.ts
diff options
context:
space:
mode:
authorKitson Kelly <me@kitsonkelly.com>2021-01-01 08:43:54 +1100
committerGitHub <noreply@github.com>2021-01-01 08:43:54 +1100
commit012f99bd9a0463813653bf8438e09b3247395984 (patch)
treeda00dc71787f564bf1cd8308ebc3fad621fb7771 /cli/tests/lib_runtime_api.ts
parent5f4e1767fea326d507395eafee25ab4ecc4b67b9 (diff)
refactor(cli): runtime compiler APIs consolidated to Deno.emit() (#8799)
Closes: #4752
Diffstat (limited to 'cli/tests/lib_runtime_api.ts')
-rw-r--r--cli/tests/lib_runtime_api.ts16
1 files changed, 9 insertions, 7 deletions
diff --git a/cli/tests/lib_runtime_api.ts b/cli/tests/lib_runtime_api.ts
index fc00825e9..450d9480b 100644
--- a/cli/tests/lib_runtime_api.ts
+++ b/cli/tests/lib_runtime_api.ts
@@ -1,12 +1,14 @@
-const [errors, program] = await Deno.compile(
+const { diagnostics, files } = await Deno.emit(
"/main.ts",
{
- "/main.ts": `document.getElementById("foo");`,
- },
- {
- lib: ["dom", "esnext"],
+ sources: {
+ "/main.ts": `document.getElementById("foo");`,
+ },
+ compilerOptions: {
+ lib: ["dom", "esnext"],
+ },
},
);
-console.log(errors);
-console.log(Object.keys(program).sort());
+console.log(diagnostics);
+console.log(Object.keys(files).sort());