forked from angus-c/just
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.js
More file actions
20 lines (19 loc) · 700 Bytes
/
Copy pathindex.js
File metadata and controls
20 lines (19 loc) · 700 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
var test = require('../util/test')(__filename);
var typeOf = require('../../packages/object-typeof');
test('all types', function(t) {
t.equal(typeOf({}), 'object');
t.equal(typeOf([]), 'array');
t.equal(typeOf(new Array()), 'array');
t.equal(typeOf(function() {}), 'function');
t.equal(typeOf(async function() {}), 'function');
t.equal(typeOf(function* () {}), 'function');
t.equal(typeOf(new Function()), 'function');
t.equal(typeOf(/a/), 'regexp');
t.equal(typeOf(new Date()), 'date');
t.equal(typeOf(null), 'null');
t.equal(typeOf(undefined), 'undefined');
t.equal(typeOf('a'), 'string');
t.equal(typeOf(3), 'number');
t.equal(typeOf(true), 'boolean');
t.end();
});