diff options
author | Kevin (Kun) "Kassimo" Qian <kevinkassimo@gmail.com> | 2020-03-24 20:55:54 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-24 23:55:54 -0400 |
commit | 3938071e91e7c3dcf7b4e727601e1e99005aceab (patch) | |
tree | cb028150a1850bb96b898f24f7f59f6c41318af0 /cli/tests | |
parent | eeedb416c098c50a05292cbbd8135b7050a5ce0e (diff) |
errors: replace .lines with explicit .split newline (#4483)
Diffstat (limited to 'cli/tests')
-rw-r--r-- | cli/tests/error_syntax_empty_trailing_line.mjs | 2 | ||||
-rw-r--r-- | cli/tests/error_syntax_empty_trailing_line.mjs.out | 2 | ||||
-rw-r--r-- | cli/tests/integration_tests.rs | 7 |
3 files changed, 11 insertions, 0 deletions
diff --git a/cli/tests/error_syntax_empty_trailing_line.mjs b/cli/tests/error_syntax_empty_trailing_line.mjs new file mode 100644 index 000000000..5bc6b1c23 --- /dev/null +++ b/cli/tests/error_syntax_empty_trailing_line.mjs @@ -0,0 +1,2 @@ +// Deliberately using .mjs to avoid triggering prettier +setTimeout(() => {}), diff --git a/cli/tests/error_syntax_empty_trailing_line.mjs.out b/cli/tests/error_syntax_empty_trailing_line.mjs.out new file mode 100644 index 000000000..1f1c96cd3 --- /dev/null +++ b/cli/tests/error_syntax_empty_trailing_line.mjs.out @@ -0,0 +1,2 @@ +error: Uncaught SyntaxError: Unexpected end of input +► file:///[WILDCARD]cli/tests/error_syntax_empty_trailing_line.mjs:[WILDCARD] diff --git a/cli/tests/integration_tests.rs b/cli/tests/integration_tests.rs index 437214dcc..02c46840e 100644 --- a/cli/tests/integration_tests.rs +++ b/cli/tests/integration_tests.rs @@ -1302,6 +1302,13 @@ itest!(error_syntax { output: "error_syntax.js.out", }); +itest!(error_syntax_empty_trailing_line { + args: "run --reload error_syntax_empty_trailing_line.mjs", + check_stderr: true, + exit_code: 1, + output: "error_syntax_empty_trailing_line.mjs.out", +}); + itest!(error_type_definitions { args: "run --reload error_type_definitions.ts", check_stderr: true, |