Skip to content

Commit 25bcaab

Browse files
authored
Add coverage check to tests (#1669)
* check coverage * Just use `Number.isNaN` as it's widely available * add test for expected value error in `closeTo` * raise coverage number to 99
1 parent da2e109 commit 25bcaab

File tree

4 files changed

+506
-22
lines changed

4 files changed

+506
-22
lines changed

lib/chai/utils/isNaN.js

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,4 @@
44
* MIT Licensed
55
*/
66

7-
/**
8-
* ### .isNaN(value)
9-
*
10-
* Checks if the given value is NaN or not.
11-
*
12-
* utils.isNaN(NaN); // true
13-
*
14-
* @param {unknown} value The value which has to be checked if it is NaN
15-
* @returns {boolean}
16-
* @name isNaN
17-
* @private
18-
*/
19-
function _isNaN(value) {
20-
// Refer http://www.ecma-international.org/ecma-262/6.0/#sec-isnan-number
21-
// section's NOTE.
22-
return value !== value;
23-
}
24-
25-
// If ECMAScript 6's Number.isNaN is present, prefer that.
26-
export const isNaN = Number.isNaN || _isNaN;
7+
export const isNaN = Number.isNaN;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy