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.
9 lines
367 B
9 lines
367 B
7 years ago
|
import test from 'ava';
|
||
|
import m from '..';
|
||
|
|
||
|
test('arrayBuffer', t => {
|
||
|
t.notThrows(() => m(new ArrayBuffer(1), m.arrayBuffer));
|
||
|
t.throws(() => m('foo', m.arrayBuffer), 'Expected argument to be of type `arrayBuffer` but received type `string`');
|
||
|
t.throws(() => m(12, m.arrayBuffer), 'Expected argument to be of type `arrayBuffer` but received type `number`');
|
||
|
});
|