Testy / TestyTs

✔️ Modern TypeScript testing framework.
http://testy.github.io
ISC License
123 stars 8 forks source link

NaN displayed as null #62

Closed Deskbot closed 3 years ago

Deskbot commented 3 years ago

Version 1.1.0

Test Code:

@Test()
test() {
    expect.toBeEqual(NaN, 0);
}

Expected outcome:

x test - Expected NaN to equal 0.

Actual outcome:

x test - Expected null  to equal 0.
Aboisier commented 3 years ago

Thanks for reporting! This should be an easy fix. I reckon there is a JSON.stringify somewhere, and JSON.stringify(NaN) === 'null'. I'll fix this soon!