mirror of
https://github.com/nodejs/node.git
synced 2026-11-30 11:55:44 -05:00
tools: add BigInt to globals
PR-URL: https://github.com/nodejs/node/pull/21237 Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Yuta Hiroto <hello@hiroppy.me> Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
1 parent
473e36dfe0
commit
bf12384988
3 files changed
+1
-3
No files matched your search
@@ -243,6 +243,7 @@ module.exports = {
|
||||
'node-core/no-unescaped-regexp-dot': 'error',
|
||||
},
|
||||
globals: {
|
||||
BigInt: false,
|
||||
COUNTER_HTTP_CLIENT_REQUEST: false,
|
||||
COUNTER_HTTP_CLIENT_RESPONSE: false,
|
||||
COUNTER_HTTP_SERVER_REQUEST: false,
|
||||
|
||||
@@ -160,7 +160,6 @@ Stats.prototype._checkModeProperty = function(property) {
|
||||
return false; // Some types are not available on Windows
|
||||
}
|
||||
if (typeof this.mode === 'bigint') { // eslint-disable-line valid-typeof
|
||||
// eslint-disable-next-line no-undef
|
||||
return (this.mode & BigInt(S_IFMT)) === BigInt(property);
|
||||
}
|
||||
return (this.mode & S_IFMT) === property;
|
||||
|
||||
@@ -31,7 +31,6 @@ function verifyStats(bigintStats, numStats) {
|
||||
`difference of ${key}.getTime() should < 2.\n` +
|
||||
`Number version ${time}, BigInt version ${time2}n`);
|
||||
} else if (key === 'mode') {
|
||||
// eslint-disable-next-line no-undef
|
||||
assert.strictEqual(bigintStats[key], BigInt(val));
|
||||
assert.strictEqual(
|
||||
bigintStats.isBlockDevice(),
|
||||
@@ -65,7 +64,6 @@ function verifyStats(bigintStats, numStats) {
|
||||
assert.strictEqual(bigintStats[key], undefined);
|
||||
assert.strictEqual(numStats[key], undefined);
|
||||
} else if (Number.isSafeInteger(val)) {
|
||||
// eslint-disable-next-line no-undef
|
||||
assert.strictEqual(bigintStats[key], BigInt(val));
|
||||
} else {
|
||||
assert(
|
||||
|
||||
Reference in new issue
Block a user