aboutsummaryrefslogtreecommitdiff
path: root/node_modules/is-object/test
diff options
context:
space:
mode:
authorMinteck <nekostarfan@gmail.com>2021-08-24 14:41:48 +0200
committerMinteck <nekostarfan@gmail.com>2021-08-24 14:41:48 +0200
commitd25e11bee6ca5ca523884da132d18e1400e077b9 (patch)
tree8af39fde19f7ed640a60fb397c7edd647dff1c4c /node_modules/is-object/test
downloadkartik-iridium-d25e11bee6ca5ca523884da132d18e1400e077b9.tar.gz
kartik-iridium-d25e11bee6ca5ca523884da132d18e1400e077b9.tar.bz2
kartik-iridium-d25e11bee6ca5ca523884da132d18e1400e077b9.zip
Initial commit
Diffstat (limited to 'node_modules/is-object/test')
-rw-r--r--node_modules/is-object/test/index.js44
1 files changed, 44 insertions, 0 deletions
diff --git a/node_modules/is-object/test/index.js b/node_modules/is-object/test/index.js
new file mode 100644
index 0000000..263d7b3
--- /dev/null
+++ b/node_modules/is-object/test/index.js
@@ -0,0 +1,44 @@
+'use strict';
+
+var test = require('tape');
+
+var isObject = require('../index');
+
+test('returns true for objects', function (assert) {
+ assert.equal(isObject({}), true);
+ assert.equal(isObject([]), true);
+
+ assert.end();
+});
+
+test('returns false for null', function (assert) {
+ assert.equal(isObject(null), false);
+
+ assert.end();
+});
+
+test('returns false for undefined', function (assert) {
+ assert.equal(isObject(undefined), false);
+
+ assert.end();
+});
+
+test('returns false for booleans', function (assert) {
+ assert.equal(isObject(true), false);
+ assert.equal(isObject(false), false);
+
+ assert.end();
+});
+
+test('returns false for primitives', function (assert) {
+ assert.equal(isObject(42), false);
+ assert.equal(isObject('foo'), false);
+
+ assert.end();
+});
+
+test('returns false for functions', function (assert) {
+ assert.equal(isObject(function () {}), false);
+
+ assert.end();
+});