test: change var to let

PR-URL: https://github.com/nodejs/node/pull/30444
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
This commit is contained in:
nathias authored and Gireesh Punathil committed 2019-11-17 20:08:36 +05:30
1 parent dcbb2ecb49
commit 6e30216f4e
2 files changed
+5 -5

No files matched your search

+2 -2
View File
@@ -40,8 +40,8 @@ const queue =
[ 'with(this){__filename}',
'42',
'throw new Error("hello")',
'var x = 100; y = x;',
'var ______________________________________________; throw 10' ];
'let x = 100; y = x;',
'let ______________________________________________; throw 10' ];
function go() {
const c = queue.shift();
+3 -3
View File
@@ -48,7 +48,7 @@ Error: hello
at endReadableNT (_stream_readable.js:*:*)
100
[stdin]:1
var x = 100; y = x;
let x = 100; y = x;
^
ReferenceError: y is not defined
@@ -64,13 +64,13 @@ ReferenceError: y is not defined
at endReadableNT (_stream_readable.js:*:*)
[stdin]:1
var ______________________________________________; throw 10
let ______________________________________________; throw 10
^
10
(Use `node --trace-uncaught ...` to show where the exception was thrown)
[stdin]:1
var ______________________________________________; throw 10
let ______________________________________________; throw 10
^
10
(Use `node --trace-uncaught ...` to show where the exception was thrown)