summaryrefslogtreecommitdiff
path: root/deps/npm/node_modules/isarray/test.js
diff options
context:
space:
mode:
Diffstat (limited to 'deps/npm/node_modules/isarray/test.js')
-rw-r--r--deps/npm/node_modules/isarray/test.js19
1 files changed, 19 insertions, 0 deletions
diff --git a/deps/npm/node_modules/isarray/test.js b/deps/npm/node_modules/isarray/test.js
new file mode 100644
index 0000000000..f7f7bcd19f
--- /dev/null
+++ b/deps/npm/node_modules/isarray/test.js
@@ -0,0 +1,19 @@
+var isArray = require('./');
+var test = require('tape');
+
+test('is array', function(t){
+ t.ok(isArray([]));
+ t.notOk(isArray({}));
+ t.notOk(isArray(null));
+ t.notOk(isArray(false));
+
+ var obj = {};
+ obj[0] = true;
+ t.notOk(isArray(obj));
+
+ var arr = [];
+ arr.foo = 'bar';
+ t.ok(isArray(arr));
+
+ t.end();
+});