Skip to content

Commit ec0b0a0

Browse files
committed
Add test
1 parent a4bd759 commit ec0b0a0

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

cli/js/compiler_api_test.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,3 +103,11 @@ test(async function bundleApiConfig() {
103103
assert(diagnostics == null);
104104
assert(!actual.includes(`random`));
105105
});
106+
107+
test(async function diagnosticsTest() {
108+
const [diagnostics] = await compile("foo.ts", {
109+
"/foo.ts": `document.getElementById("foo");`
110+
});
111+
assert(Array.isArray(diagnostics));
112+
assert(diagnostics.length === 1);
113+
});

0 commit comments

Comments
 (0)