diff options
author | Ryan Dahl <ry@tinyclouds.org> | 2019-01-11 14:31:17 -0500 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2019-01-11 21:44:26 -0500 |
commit | 6322f45e7b11eb0124bcf63b679b4db05f1acdb6 (patch) | |
tree | 3233763c08a2051710d27a309e3482b2e36e84f8 /tests | |
parent | 8fdc1251cd752fc7dc20ad9dac43a3f05d67b87e (diff) |
Pipe new exception info through into JSError
Adds a new integration test for syntax error.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/async_error.ts.out | 3 | ||||
-rw-r--r-- | tests/error_008_checkjs.js.out | 3 | ||||
-rw-r--r-- | tests/error_syntax.js | 3 | ||||
-rw-r--r-- | tests/error_syntax.js.out | 4 | ||||
-rw-r--r-- | tests/error_syntax.test | 4 |
5 files changed, 17 insertions, 0 deletions
diff --git a/tests/async_error.ts.out b/tests/async_error.ts.out index 8054551e4..a33abb4df 100644 --- a/tests/async_error.ts.out +++ b/tests/async_error.ts.out @@ -1,6 +1,9 @@ [WILDCARD]hello before error world +[WILDCARD]tests/async_error.ts:4:10 + throw Error("error"); + Error: error at foo ([WILDCARD]tests/async_error.ts:4:9) at [WILDCARD]tests/async_error.ts:7:1 diff --git a/tests/error_008_checkjs.js.out b/tests/error_008_checkjs.js.out index c40012712..eb56aad17 100644 --- a/tests/error_008_checkjs.js.out +++ b/tests/error_008_checkjs.js.out @@ -1,2 +1,5 @@ +[WILDCARD]tests/error_008_checkjs.js:2:0 +consol.log("hello world!"); + ReferenceError: consol is not defined at [WILDCARD]tests/error_008_checkjs.js:2:1 diff --git a/tests/error_syntax.js b/tests/error_syntax.js new file mode 100644 index 000000000..0c0c09855 --- /dev/null +++ b/tests/error_syntax.js @@ -0,0 +1,3 @@ + +// prettier-ignore +(the following is a syntax error ^^ ! ) diff --git a/tests/error_syntax.js.out b/tests/error_syntax.js.out new file mode 100644 index 000000000..c7d229702 --- /dev/null +++ b/tests/error_syntax.js.out @@ -0,0 +1,4 @@ +[WILDCARD]tests/error_syntax.js:3:5 +(the following is a syntax error ^^ ! ) + +SyntaxError: Unexpected identifier diff --git a/tests/error_syntax.test b/tests/error_syntax.test new file mode 100644 index 000000000..297711bfa --- /dev/null +++ b/tests/error_syntax.test @@ -0,0 +1,4 @@ +args: tests/error_syntax.js --reload +check_stderr: true +exit_code: 1 +output: tests/error_syntax.js.out |