diff options
| author | Yagiz Nizipli <yagiz@nizipli.com> | 2023-04-28 12:21:01 -0400 |
|---|---|---|
| committer | Yagiz Nizipli <yagiz@nizipli.com> | 2023-04-28 14:59:39 -0400 |
| commit | eb7379b62e356d973c91a2c1d433d8d2770cee18 (patch) | |
| tree | b763546dfc65fc860b7fb5dbfe2ffaa73328c264 /test/parallel | |
| parent | b31d587dc8c1b0f459243d2b96a17a7175c996cf (diff) | |
| download | node-new-navigator-platform.tar.gz | |
lib: add `navigator.platform`navigator-platform
Co-authored-by: Mestery <mestery@protonmail.com>
Co-authored-by: Voltrex <mohammadkeyvanzade94@gmail.com>
Diffstat (limited to 'test/parallel')
| -rw-r--r-- | test/parallel/test-bootstrap-modules.js | 2 | ||||
| -rw-r--r-- | test/parallel/test-global.js | 1 | ||||
| -rw-r--r-- | test/parallel/test-navigator.js | 16 |
3 files changed, 19 insertions, 0 deletions
diff --git a/test/parallel/test-bootstrap-modules.js b/test/parallel/test-bootstrap-modules.js index 0a671eb95e..32f90905b6 100644 --- a/test/parallel/test-bootstrap-modules.js +++ b/test/parallel/test-bootstrap-modules.js @@ -46,6 +46,8 @@ const expectedModules = new Set([ 'NativeModule async_hooks', 'NativeModule internal/process/task_queues', 'NativeModule timers', + 'Internal Binding os', + 'NativeModule internal/navigator', 'Internal Binding trace_events', 'NativeModule internal/constants', 'NativeModule path', diff --git a/test/parallel/test-global.js b/test/parallel/test-global.js index 9ac9b4f728..3fd9a3f6f5 100644 --- a/test/parallel/test-global.js +++ b/test/parallel/test-global.js @@ -49,6 +49,7 @@ builtinModules.forEach((moduleName) => { 'clearImmediate', 'clearInterval', 'clearTimeout', + 'navigator', 'atob', 'btoa', 'performance', diff --git a/test/parallel/test-navigator.js b/test/parallel/test-navigator.js new file mode 100644 index 0000000000..ba760846bb --- /dev/null +++ b/test/parallel/test-navigator.js @@ -0,0 +1,16 @@ +'use strict'; + +require('../common'); +const assert = require('assert'); +const { platform } = require('process'); + +assert.strictEqual(navigator.platform, { + aix: 'AIX', + android: 'Android', + darwin: 'MacIntel', + freebsd: 'FreeBSD', + linux: 'Linux', + openbsd: 'OpenBSD', + sunos: 'SunOS', + win32: 'Win32', +}[platform]); |
