summaryrefslogtreecommitdiff
path: root/cli/tests
diff options
context:
space:
mode:
Diffstat (limited to 'cli/tests')
-rw-r--r--cli/tests/integration_tests.rs5
-rw-r--r--cli/tests/lib_dom_asynciterable.ts23
-rw-r--r--cli/tests/lib_dom_asynciterable.ts.out2
3 files changed, 30 insertions, 0 deletions
diff --git a/cli/tests/integration_tests.rs b/cli/tests/integration_tests.rs
index 1e64f3cdd..662b0e277 100644
--- a/cli/tests/integration_tests.rs
+++ b/cli/tests/integration_tests.rs
@@ -3104,6 +3104,11 @@ itest!(runtime_decorators {
output: "runtime_decorators.ts.out",
});
+itest!(lib_dom_asynciterable {
+ args: "run --quiet --unstable --reload lib_dom_asynciterable.ts",
+ output: "lib_dom_asynciterable.ts.out",
+});
+
itest!(lib_ref {
args: "run --quiet --unstable --reload lib_ref.ts",
output: "lib_ref.ts.out",
diff --git a/cli/tests/lib_dom_asynciterable.ts b/cli/tests/lib_dom_asynciterable.ts
new file mode 100644
index 000000000..d932011f4
--- /dev/null
+++ b/cli/tests/lib_dom_asynciterable.ts
@@ -0,0 +1,23 @@
+const { diagnostics, files } = await Deno.emit("/main.ts", {
+ compilerOptions: {
+ target: "esnext",
+ lib: ["esnext", "dom", "dom.iterable", "dom.asynciterable"],
+ },
+ sources: {
+ "/main.ts": `const rs = new ReadableStream<string>({
+ start(c) {
+ c.enqueue("hello");
+ c.enqueue("deno");
+ c.close();
+ }
+ });
+
+ for await (const s of rs) {
+ console.log("s");
+ }
+ `,
+ },
+});
+
+console.log(diagnostics);
+console.log(Object.keys(files).sort());
diff --git a/cli/tests/lib_dom_asynciterable.ts.out b/cli/tests/lib_dom_asynciterable.ts.out
new file mode 100644
index 000000000..8b5e7adb6
--- /dev/null
+++ b/cli/tests/lib_dom_asynciterable.ts.out
@@ -0,0 +1,2 @@
+[]
+[ "[WILDCARD]/main.ts.js", "[WILDCARD]/main.ts.js.map" ]