mirror of https://github.com/lukechilds/ow.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
11 lines
387 B
11 lines
387 B
import test from 'ava';
|
|
import m from '..';
|
|
|
|
test('null', t => {
|
|
const x = null;
|
|
|
|
t.notThrows(() => m(null, m.null));
|
|
t.notThrows(() => m(x, m.null));
|
|
t.throws(() => m(undefined as any, m.null), 'Expected argument to be of type `null` but received type `undefined`');
|
|
t.throws(() => m('foo' as any, m.null), 'Expected argument to be of type `null` but received type `string`');
|
|
});
|
|
|