Comparing version 10.6.0 to 10.6.1
@@ -23,2 +23,4 @@ 'use strict'; | ||
var MAX_TIMEOUT = Math.pow(2, 31) - 1; | ||
module.exports = Runnable; | ||
@@ -99,4 +101,3 @@ | ||
// Clamp to range | ||
var INT_MAX = Math.pow(2, 31) - 1; | ||
var range = [0, INT_MAX]; | ||
var range = [0, MAX_TIMEOUT]; | ||
ms = utils.clamp(ms, range); | ||
@@ -238,7 +239,4 @@ | ||
var self = this; | ||
var ms = this.timeout(); | ||
var ms = this.timeout() || MAX_TIMEOUT; | ||
if (ms === 0) { | ||
return; | ||
} | ||
this.clearTimeout(); | ||
@@ -245,0 +243,0 @@ this.timer = setTimeout(function () { |
@@ -141,3 +141,3 @@ 'use strict'; | ||
* canonicalType(async function() {}) // 'asyncfunction' | ||
* canonicalType(await import(name)) // 'module' | ||
* canonicalType(Object.create(null)) // 'null-prototype' | ||
*/ | ||
@@ -151,3 +151,6 @@ var canonicalType = (exports.canonicalType = function canonicalType(value) { | ||
return 'buffer'; | ||
} else if (Object.getPrototypeOf(value) === null) { | ||
return 'null-prototype'; | ||
} | ||
return Object.prototype.toString | ||
@@ -218,3 +221,3 @@ .call(value) | ||
if (!~['object', 'array', 'function'].indexOf(typeHint)) { | ||
if (!~['object', 'array', 'function', 'null-prototype'].indexOf(typeHint)) { | ||
if (typeHint === 'buffer') { | ||
@@ -405,4 +408,8 @@ var json = Buffer.prototype.toJSON.call(value); | ||
/* falls through */ | ||
case 'null-prototype': | ||
case 'object': | ||
canonicalizedObj = canonicalizedObj || {}; | ||
if (typeHint === 'null-prototype' && Symbol.toStringTag in value) { | ||
canonicalizedObj['[Symbol.toStringTag]'] = value[Symbol.toStringTag]; | ||
} | ||
withStack(value, function () { | ||
@@ -409,0 +416,0 @@ Object.keys(value) |
{ | ||
"name": "mocha", | ||
"version": "10.6.0", | ||
"version": "10.6.1", | ||
"type": "commonjs", | ||
@@ -95,3 +95,2 @@ "description": "simple, flexible, fun test framework", | ||
"globals": "^13.24.0", | ||
"hyperlink": "^5.0.4", | ||
"jsdoc": "^3.6.7", | ||
@@ -98,0 +97,0 @@ "jsdoc-ts-utils": "^2.0.1", |
@@ -10,3 +10,2 @@ <p align="center"> | ||
<a href="https://coveralls.io/github/mochajs/mocha"><img src="https://coveralls.io/repos/github/mochajs/mocha/badge.svg" alt="Coverage Status"></a> | ||
<a href="https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fmochajs%2Fmocha?ref=badge_shield"><img src="https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fmochajs%2Fmocha.svg?type=shield" alt="FOSSA Status"></a> | ||
<a href="https://discord.gg/KeDn2uXhER"><img alt="Chat - Discord" src="https://img.shields.io/badge/chat-Discord-5765F2.svg" /></a> | ||
@@ -13,0 +12,0 @@ <a href="https://github.com/mochajs/mocha#sponsors"><img src="https://opencollective.com/mochajs/tiers/sponsors/badge.svg" alt="OpenCollective Sponsors"></a> |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2117138
60
30464
74