Add is.class() (#2)

This commit is contained in:
Or Schneider 2017-09-24 22:26:15 +03:00 committed by Sindre Sorhus
parent 103c5afe6f
commit 119c41d39b
3 changed files with 19 additions and 1 deletions

12
test.js
View file

@ -273,6 +273,18 @@ test('is.iterable', t => {
t.false(m.iterable({}));
});
test('is.class', t => {
class Foo {}
const classDeclarations = [
Foo,
class Bar extends Foo {}
];
for (const x of classDeclarations) {
t.true(m.class(x));
}
});
test('is.typedArray', t => {
const typedArrays = [
new Int8Array(),