Use `assert.ok(isNaN(x))` for `NaN` tests