diff options
| author | David Sherret <dsherret@users.noreply.github.com> | 2024-05-14 18:01:31 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-05-14 22:01:31 +0000 |
| commit | 4ddc85e1daa88ef96a2fe730ccfd159c7f1dbb38 (patch) | |
| tree | f61bdfc9022cdf142897ee783afdbb1f4a8605d7 /tests/specs | |
| parent | dda8979cb18a2477ceb2ba0e84e0342a7fc516bd (diff) | |
fix(emit): regression - keep comments in emit (#23815)
Closes https://github.com/denoland/deno/discussions/23814
Diffstat (limited to 'tests/specs')
| -rw-r--r-- | tests/specs/run/keep_comments_ts/__test__.jsonc | 4 | ||||
| -rw-r--r-- | tests/specs/run/keep_comments_ts/main.out | 4 | ||||
| -rw-r--r-- | tests/specs/run/keep_comments_ts/main.ts | 7 |
3 files changed, 15 insertions, 0 deletions
diff --git a/tests/specs/run/keep_comments_ts/__test__.jsonc b/tests/specs/run/keep_comments_ts/__test__.jsonc new file mode 100644 index 000000000..5517e693d --- /dev/null +++ b/tests/specs/run/keep_comments_ts/__test__.jsonc @@ -0,0 +1,4 @@ +{ + "args": "run main.ts", + "output": "main.out" +} diff --git a/tests/specs/run/keep_comments_ts/main.out b/tests/specs/run/keep_comments_ts/main.out new file mode 100644 index 000000000..8cf85ee71 --- /dev/null +++ b/tests/specs/run/keep_comments_ts/main.out @@ -0,0 +1,4 @@ +function test() { + // this comment should be in output + return 1 + 1; +} diff --git a/tests/specs/run/keep_comments_ts/main.ts b/tests/specs/run/keep_comments_ts/main.ts new file mode 100644 index 000000000..ff58eff2e --- /dev/null +++ b/tests/specs/run/keep_comments_ts/main.ts @@ -0,0 +1,7 @@ +function test() { + // this comment should be in output + return 1 + 1; +} + +// should include the comments because people rely on this behavior +console.log(test.toString()); |
