From ee003fce67519201339897e5961a999258675423 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Fri, 24 Jan 2025 06:40:49 -0800 Subject: [PATCH] test: use strict mode in global setters test test-global-setters.js was added in https://github.com/nodejs/node/pull/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.) --- test/parallel/test-global-setters.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/parallel/test-global-setters.js b/test/parallel/test-global-setters.js index 7fd070ed8e1c4e..8c2870e315002a 100644 --- a/test/parallel/test-global-setters.js +++ b/test/parallel/test-global-setters.js @@ -1,4 +1,4 @@ -/* eslint-disable strict */ +'use strict'; require('../common'); const assert = require('assert'); const _process = require('process');