test: use strict mode in global setters test · nodejs/node@d2bfbfa · GitHub
Skip to content

Commit d2bfbfa

Browse files
Trottaduh95
authored andcommitted
test: use strict mode in global setters test
test-global-setters.js was added in #26882 and hasn't been modified since. It appears that it avoids strict mode so that unscoped identifiers are treated as globals, but that's true in strict mode too. (In sloppy mode, an assignment to an undefined identifier will create a global, but that's not what this test does. In strict mode, those assignments will throw an error, which would seem to be what we would want.) PR-URL: #56742 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Guy Bedford <guybedford@gmail.com>
1 parent a48430d commit d2bfbfa

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

test/parallel/test-global-setters.js

Lines changed: 7 additions & 1 deletion

0 commit comments

Comments
 (0)