How to use the assert.isObject function in assert

To help you get started, we’ve selected a few assert examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github pump-io / pump.io / test / host-test-as-root.js View on Github external
"it works": function(err, dupe, host) {
                    assert.ifError(err);
                    assert.isObject(dupe);
                    assert.isObject(host);
                },
                "and we check its properties": function(err, dupe, host) {
github pump-io / pump.io / test / lib / xrd.js View on Github external
"it works": function(err, doc, res) {
            assert.ifError(err);
            assert.isObject(doc);
            assert.isObject(res);
        },
        "it has an JRD content type": typeCheck("application/json; charset=utf-8")
github pump-io / pump.io / test / distributor-remote-list-test-as-root.js View on Github external
"it includes the activity": function(err, feed, post, list) {
                                assert.ifError(err);
                                assert.isObject(feed);
                                assert.isObject(post);
                                assert.include(feed, "items");
                                assert.isArray(feed.items);
                                assert.greater(feed.items.length, 0);
                                assert.isObject(_.find(feed.items, function(item) { return item.id === post.id; }));
                            }
                        }
github log4js-node / log4js-node / test / test-nolog.js View on Github external
'should return a "connect logger" factory' : function(clm) {
	  assert.isObject(clm);
      },
github pump-io / pump.io / test / distributor-remote-test-as-root.js View on Github external
"it works": function(err, cred1, cred2) {
                assert.ifError(err);
                assert.isObject(cred1);
                assert.isObject(cred2);
            },
            "and one user follows the other": {
github pump-io / pump.io / test / distributor-multiple-remote-test-as-root.js View on Github external
"they include the activity": function(err, inbox2, inbox3, act) {
                                    assert.ifError(err);
                                    assert.isObject(inbox2);
                                    assert.isObject(inbox3);
                                    assert.isObject(act);
                                    assert.include(inbox2, "items");
                                    assert.isArray(inbox2.items);
                                    assert.greater(inbox2.items.length, 0);
                                    assert.isObject(_.find(inbox2.items, function(item) { return item.id === act.id; }),
                                    "Activity is not in first inbox");
                                    assert.include(inbox3, "items");
                                    assert.isArray(inbox3.items);
                                    assert.greater(inbox3.items.length, 0);
                                    assert.isObject(_.find(inbox3.items, function(item) { return item.id === act.id; }),
                                    "Activity is not in second inbox");
                                }
                            }
github jshint / fixmyjs / test / koala.js View on Github external
"we expect the next item to be an Object": function (topic) {
      assert.isObject(topic);
      assert.isFunction(topic.fix);
      assert.isFunction(topic.getDetails);
    }
  },
github pump-io / pump.io / test / upload-file-test-system.js View on Github external
"it works": function(err, act) {
                            assert.ifError(err);
                            assert.isObject(act);
                        }
                    }
github pump-io / pump.io / test / distributor-remote-test-as-root.js View on Github external
"activity likes and replies feeds have right host": function(err, feed, act) {
                                    var item;
                                    assert.ifError(err);
                                    assert.isObject(feed);
                                    assert.isArray(feed.items);
                                    assert.greater(feed.items.length, 0);
                                    item = _.find(feed.items, function(item) { return item.id === act.id; });
                                    assert.isObject(item);
                                    assert.isObject(item.object);
                                    assert.isObject(item.object.likes);
                                    assert.isString(item.object.likes.url);
                                    assert.equal(serverOf(item.object.likes.url), "photo.localhost");
                                    assert.isObject(item.object.replies);
                                    assert.isString(item.object.replies.url);
                                    assert.equal(serverOf(item.object.replies.url), "photo.localhost");
                                }
                            },
github ciaranj / node-oauth / tests / oauthtests.js View on Github external
'it should return a request object': function(oa) {
             var request= oa.delete("http://foo.com/blah", "token", "token_secret")
             assert.isObject(request);
             assert.equal(request.method, "DELETE");
             request.end();
           }
         },