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

+1-20
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)