Skip to content

Commit

Permalink
test: use strict mode in global setters test
Browse files Browse the repository at this point in the history
test-global-setters.js was added in
nodejs#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.)
  • Loading branch information
Trott committed Jan 24, 2025
1 parent 1921371 commit ee003fc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/parallel/test-global-setters.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* eslint-disable strict */
'use strict';
require('../common');
const assert = require('assert');
const _process = require('process');
Expand Down

0 comments on commit ee003fc

Please sign in to comment.