[d565449] | 1 | 'use strict';
|
---|
| 2 |
|
---|
| 3 | var test = require('tape');
|
---|
| 4 | var isNegativeZero = require('../');
|
---|
| 5 |
|
---|
| 6 | test('not negative zero', function (t) {
|
---|
| 7 | // @ts-expect-error
|
---|
| 8 | t.notOk(isNegativeZero(), 'undefined is not negative zero');
|
---|
| 9 | t.notOk(isNegativeZero(null), 'null is not negative zero');
|
---|
| 10 | t.notOk(isNegativeZero(false), 'false is not negative zero');
|
---|
| 11 | t.notOk(isNegativeZero(true), 'true is not negative zero');
|
---|
| 12 | t.notOk(isNegativeZero(0), 'positive zero is not negative zero');
|
---|
| 13 | t.notOk(isNegativeZero(Infinity), 'Infinity is not negative zero');
|
---|
| 14 | t.notOk(isNegativeZero(-Infinity), '-Infinity is not negative zero');
|
---|
| 15 | t.notOk(isNegativeZero(NaN), 'NaN is not negative zero');
|
---|
| 16 | t.notOk(isNegativeZero('foo'), 'string is not negative zero');
|
---|
| 17 | t.notOk(isNegativeZero([]), 'array is not negative zero');
|
---|
| 18 | t.notOk(isNegativeZero({}), 'object is not negative zero');
|
---|
| 19 | t.notOk(isNegativeZero(function () {}), 'function is not negative zero');
|
---|
| 20 | t.notOk(isNegativeZero(-1), '-1 is not negative zero');
|
---|
| 21 |
|
---|
| 22 | t.end();
|
---|
| 23 | });
|
---|
| 24 |
|
---|
| 25 | test('negative zero', function (t) {
|
---|
| 26 | t.ok(isNegativeZero(-0), 'negative zero is negative zero');
|
---|
| 27 | t.end();
|
---|
| 28 | });
|
---|
| 29 |
|
---|