summaryrefslogtreecommitdiff
path: root/cli/tests/testdata/inspector
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2022-01-09 17:44:36 +0100
committerGitHub <noreply@github.com>2022-01-09 17:44:36 +0100
commitbd53567acf7d7bb28e51c0137054c5a9d9e19bf1 (patch)
treea0f851eaef0c6164b847d75b44cfb26a676a9e53 /cli/tests/testdata/inspector
parent1fb5858009f598ce3f917f9f49c466db81f4d9b0 (diff)
test: add inspector test with ts files (#13312)
Diffstat (limited to 'cli/tests/testdata/inspector')
-rw-r--r--cli/tests/testdata/inspector/bar.js3
-rw-r--r--cli/tests/testdata/inspector/foo.ts10
-rw-r--r--cli/tests/testdata/inspector/inspector1.js3
-rw-r--r--cli/tests/testdata/inspector/inspector2.js4
-rw-r--r--cli/tests/testdata/inspector/inspector3.js7
-rw-r--r--cli/tests/testdata/inspector/inspector4.js5
-rw-r--r--cli/tests/testdata/inspector/inspector_test.js3
-rw-r--r--cli/tests/testdata/inspector/test.ts5
8 files changed, 40 insertions, 0 deletions
diff --git a/cli/tests/testdata/inspector/bar.js b/cli/tests/testdata/inspector/bar.js
new file mode 100644
index 000000000..278fc9030
--- /dev/null
+++ b/cli/tests/testdata/inspector/bar.js
@@ -0,0 +1,3 @@
+export function bar() {
+ return "world";
+}
diff --git a/cli/tests/testdata/inspector/foo.ts b/cli/tests/testdata/inspector/foo.ts
new file mode 100644
index 000000000..c0735926f
--- /dev/null
+++ b/cli/tests/testdata/inspector/foo.ts
@@ -0,0 +1,10 @@
+class Foo {
+ hello(): string {
+ return "hello";
+ }
+}
+
+export function foo(): string {
+ const f = new Foo();
+ return f.hello();
+}
diff --git a/cli/tests/testdata/inspector/inspector1.js b/cli/tests/testdata/inspector/inspector1.js
new file mode 100644
index 000000000..5cb059def
--- /dev/null
+++ b/cli/tests/testdata/inspector/inspector1.js
@@ -0,0 +1,3 @@
+setInterval(() => {
+ console.log("hello");
+}, 1000);
diff --git a/cli/tests/testdata/inspector/inspector2.js b/cli/tests/testdata/inspector/inspector2.js
new file mode 100644
index 000000000..57f80ef94
--- /dev/null
+++ b/cli/tests/testdata/inspector/inspector2.js
@@ -0,0 +1,4 @@
+console.log("hello from the script");
+
+// This process will be killed before the timeout is over.
+await new Promise((res, _) => setTimeout(res, 1000));
diff --git a/cli/tests/testdata/inspector/inspector3.js b/cli/tests/testdata/inspector/inspector3.js
new file mode 100644
index 000000000..b1b00b5a0
--- /dev/null
+++ b/cli/tests/testdata/inspector/inspector3.js
@@ -0,0 +1,7 @@
+// deno-lint-ignore-file
+for (let i = 0; i < 128; i++) {
+ console.log(i);
+ debugger;
+}
+await new Promise((res, _) => setTimeout(res, 100));
+console.log("done");
diff --git a/cli/tests/testdata/inspector/inspector4.js b/cli/tests/testdata/inspector/inspector4.js
new file mode 100644
index 000000000..1bf419650
--- /dev/null
+++ b/cli/tests/testdata/inspector/inspector4.js
@@ -0,0 +1,5 @@
+console.log("hello");
+
+setInterval(() => {
+ console.log("hello from interval");
+}, 1000);
diff --git a/cli/tests/testdata/inspector/inspector_test.js b/cli/tests/testdata/inspector/inspector_test.js
new file mode 100644
index 000000000..86cd48854
--- /dev/null
+++ b/cli/tests/testdata/inspector/inspector_test.js
@@ -0,0 +1,3 @@
+Deno.test("basic test", () => {
+ console.log("test has finished running");
+});
diff --git a/cli/tests/testdata/inspector/test.ts b/cli/tests/testdata/inspector/test.ts
new file mode 100644
index 000000000..2b33f22e5
--- /dev/null
+++ b/cli/tests/testdata/inspector/test.ts
@@ -0,0 +1,5 @@
+import { foo } from "./foo.ts";
+import { bar } from "./bar.js";
+
+console.log(foo());
+console.log(bar());