diff options
author | Alex Lam S.L <alexlamsl@gmail.com> | 2017-06-13 04:57:26 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-13 04:57:26 +0800 |
commit | fed009655623705f44f12f62ef2ecd7d9be86d86 (patch) | |
tree | a9f61a47fb1ea4d4d16313cd5643d83b092468e8 /test/compress | |
parent | 2bdc8802ddd913a8b3b921426e898fc2f2257265 (diff) | |
download | tracifyjs-fed009655623705f44f12f62ef2ecd7d9be86d86.tar.gz tracifyjs-fed009655623705f44f12f62ef2ecd7d9be86d86.zip |
allow `expect_stdout` to specify `Error` (#2087)
Diffstat (limited to 'test/compress')
-rw-r--r-- | test/compress/node_version.js | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/test/compress/node_version.js b/test/compress/node_version.js index ad0bfa15..ef62fd70 100644 --- a/test/compress/node_version.js +++ b/test/compress/node_version.js @@ -1,4 +1,4 @@ -eval_let: { +eval_let_6: { input: { eval("let a;"); console.log(); @@ -10,3 +10,29 @@ eval_let: { expect_stdout: "" node_version: ">=6" } + +eval_let_4: { + input: { + eval("let a;"); + console.log(); + } + expect: { + eval("let a;"); + console.log(); + } + expect_stdout: SyntaxError("Block-scoped declarations (let, const, function, class) not yet supported outside strict mode") + node_version: "4" +} + +eval_let_0: { + input: { + eval("let a;"); + console.log(); + } + expect: { + eval("let a;"); + console.log(); + } + expect_stdout: SyntaxError("Unexpected identifier") + node_version: "<=0.12" +} |