diff options
Diffstat (limited to 'tests/testdata/inspector')
| -rw-r--r-- | tests/testdata/inspector/bar.js | 3 | ||||
| -rw-r--r-- | tests/testdata/inspector/error_with_npm_import.js | 7 | ||||
| -rw-r--r-- | tests/testdata/inspector/foo.ts | 10 | ||||
| -rw-r--r-- | tests/testdata/inspector/inspect_wait.js | 2 | ||||
| -rw-r--r-- | tests/testdata/inspector/inspector1.js | 3 | ||||
| -rw-r--r-- | tests/testdata/inspector/inspector2.js | 4 | ||||
| -rw-r--r-- | tests/testdata/inspector/inspector3.js | 13 | ||||
| -rw-r--r-- | tests/testdata/inspector/inspector4.js | 5 | ||||
| -rw-r--r-- | tests/testdata/inspector/inspector_test.js | 3 | ||||
| -rw-r--r-- | tests/testdata/inspector/memory.js | 13 | ||||
| -rw-r--r-- | tests/testdata/inspector/test.ts | 5 |
11 files changed, 68 insertions, 0 deletions
diff --git a/tests/testdata/inspector/bar.js b/tests/testdata/inspector/bar.js new file mode 100644 index 000000000..278fc9030 --- /dev/null +++ b/tests/testdata/inspector/bar.js @@ -0,0 +1,3 @@ +export function bar() { + return "world"; +} diff --git a/tests/testdata/inspector/error_with_npm_import.js b/tests/testdata/inspector/error_with_npm_import.js new file mode 100644 index 000000000..9244f2cf2 --- /dev/null +++ b/tests/testdata/inspector/error_with_npm_import.js @@ -0,0 +1,7 @@ +// deno-lint-ignore-file + +import chalk from "npm:chalk"; + +console.log("hello"); + +throw new Error("boom!"); diff --git a/tests/testdata/inspector/foo.ts b/tests/testdata/inspector/foo.ts new file mode 100644 index 000000000..c0735926f --- /dev/null +++ b/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/tests/testdata/inspector/inspect_wait.js b/tests/testdata/inspector/inspect_wait.js new file mode 100644 index 000000000..e2b10199c --- /dev/null +++ b/tests/testdata/inspector/inspect_wait.js @@ -0,0 +1,2 @@ +Deno.writeTextFileSync("./hello.txt", "hello world"); +console.error("did run"); diff --git a/tests/testdata/inspector/inspector1.js b/tests/testdata/inspector/inspector1.js new file mode 100644 index 000000000..5cb059def --- /dev/null +++ b/tests/testdata/inspector/inspector1.js @@ -0,0 +1,3 @@ +setInterval(() => { + console.log("hello"); +}, 1000); diff --git a/tests/testdata/inspector/inspector2.js b/tests/testdata/inspector/inspector2.js new file mode 100644 index 000000000..57f80ef94 --- /dev/null +++ b/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/tests/testdata/inspector/inspector3.js b/tests/testdata/inspector/inspector3.js new file mode 100644 index 000000000..8d605a286 --- /dev/null +++ b/tests/testdata/inspector/inspector3.js @@ -0,0 +1,13 @@ +// deno-lint-ignore-file + +// check that console methods provided by V8 are available in the inspector +console.timeStamp("foo"); +console.profile("foo"); +console.profileEnd("foo"); + +for (let i = 0; i < 128; i++) { + console.log(i); + debugger; +} +await new Promise((res, _) => setTimeout(res, 100)); +console.log("done"); diff --git a/tests/testdata/inspector/inspector4.js b/tests/testdata/inspector/inspector4.js new file mode 100644 index 000000000..1bf419650 --- /dev/null +++ b/tests/testdata/inspector/inspector4.js @@ -0,0 +1,5 @@ +console.log("hello"); + +setInterval(() => { + console.log("hello from interval"); +}, 1000); diff --git a/tests/testdata/inspector/inspector_test.js b/tests/testdata/inspector/inspector_test.js new file mode 100644 index 000000000..86cd48854 --- /dev/null +++ b/tests/testdata/inspector/inspector_test.js @@ -0,0 +1,3 @@ +Deno.test("basic test", () => { + console.log("test has finished running"); +}); diff --git a/tests/testdata/inspector/memory.js b/tests/testdata/inspector/memory.js new file mode 100644 index 000000000..082d6367c --- /dev/null +++ b/tests/testdata/inspector/memory.js @@ -0,0 +1,13 @@ +const objs = []; + +class Foo { + foo() { + return "foo"; + } +} + +setInterval(() => { + objs.push(new Foo()); +}, 1000); + +console.log("hello!"); diff --git a/tests/testdata/inspector/test.ts b/tests/testdata/inspector/test.ts new file mode 100644 index 000000000..2b33f22e5 --- /dev/null +++ b/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()); |
