mirror of
https://github.com/nodejs/node.git
synced 2026-11-09 15:11:11 -05:00
Co-authored-by: Mestery <mestery@protonmail.com> Co-authored-by: Voltrex <mohammadkeyvanzade94@gmail.com> PR-URL: https://github.com/nodejs/node/pull/47769 Reviewed-By: Robert Nagy <ronagy@icloud.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
16 lines
409 B
JavaScript
16 lines
409 B
JavaScript
'use strict';
|
|
|
|
require('../common');
|
|
const assert = require('assert');
|
|
|
|
const is = {
|
|
number: (value, key) => {
|
|
assert(!Number.isNaN(value), `${key} should not be NaN`);
|
|
assert.strictEqual(typeof value, 'number');
|
|
},
|
|
};
|
|
|
|
is.number(+navigator.hardwareConcurrency, 'hardwareConcurrency');
|
|
is.number(navigator.hardwareConcurrency, 'hardwareConcurrency');
|
|
assert.ok(navigator.hardwareConcurrency > 0);
|