File: test.js

package info (click to toggle)
node-is-finite 1.1.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, sid
  • size: 148 kB
  • sloc: javascript: 19; makefile: 2
file content (16 lines) | stat: -rw-r--r-- 363 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
const test = require('tape');
Number.isFinite = undefined;
const isFinite = require('.');

test('main', t => {
	t.true(isFinite(0));
	t.true(isFinite(100));
	t.true(isFinite(-100));
	t.true(isFinite(4e44));
	t.false(isFinite('0'));
	t.false(isFinite(NaN));
	t.false(isFinite(undefined));
	t.false(isFinite(Infinity));
	t.false(isFinite(-Infinity));
	t.end();
});