Skip to content

Commit 57fda3b

Browse files
author
Mohamed Sayed
committed
fix: iterate Navigator.prototype instead of lists
Signed-off-by: Mohamed Sayed <k@3zrv.com>
1 parent a8d88e8 commit 57fda3b

1 file changed

Lines changed: 1 addition & 9 deletions

File tree

test/parallel/test-navigator.js

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -150,15 +150,7 @@ assert.strictEqual(navigator.languages[0] !== 'for-testing', true);
150150

151151
{
152152
const { Navigator } = globalThis;
153-
const getterNames = [
154-
'hardwareConcurrency',
155-
'locks',
156-
'language',
157-
'languages',
158-
'userAgent',
159-
'platform',
160-
];
161-
for (const name of getterNames) {
153+
for (const name of Object.keys(Navigator.prototype)) {
162154
assert.throws(
163155
() => Navigator.prototype[name],
164156
{

0 commit comments

Comments
 (0)