"it has no prev link": function(err, feed) { assert.ifError(err); assert.include(feed, "links"); assert.isFalse(_.has(feed.links, "prev")); }
"it has the webfinger as ID": function(err, obj) { assert.ifError(err); assert.isObject(obj); assert.include(obj, "id"); assert.equal(obj.id, "acct:alice@geographic.example"); }
"it is a service": function(err, obj) { assert.ifError(err); assert.isObject(obj); assert.include(obj, "objectType"); assert.equal(obj.objectType, "service"); },
"it has next but no prev": function(err, feed) { assert.ifError(err); assert.include(feed.links, "next"); assert.include(feed.links.next, "href"); assert.isFalse(feed.links.hasOwnProperty("prev")); }
"by giving a valid install instance" : function(svcMetaInfo) { assert.include(svcMetaInfo, "id"); },
"`include`": function () { assertNoArguments(assert.include); assert.include("hello world", "world"); assert.include([0, 42, 0], 42); assert.include({goo:true}, 'goo'); },
return function(err, allow, res, body) { assert.include(allow, method); };
.expect('should respond with '+result+' in body', function (err, res, body) { assert.include(body, result); })
"results include client_id and client_secret": function(err, cred1, cred2) { assert.ifError(err); assert.isObject(cred2); assert.include(cred2, "client_id"); assert.include(cred2, "client_secret"); },
"should have the children ids": function (err, obj) { assert.isNull(err); assert.include(obj.repository_ids, 'bullet'); }
function (err, result, response) { assert.isNull(err); assert.include(result, 'name'); }
"should contain the new child object in the array": function (err, obj) { assert.isNull(err); assert.lengthOf(obj.repository_ids, 3); assert.include(obj.repository_ids, 'haibu'); }
['redis_version', 'redis_git_sha1', 'redis_git_dirty', 'arch_bits', 'multiplexing_api', 'process_id', 'uptime_in_seconds', 'uptime_in_days', 'connected_clients', 'connected_slaves', 'blocked_clients', 'used_memory', 'used_memory_human', 'changes_since_last_save', 'bgsave_in_progress', 'last_save_time', 'bgrewriteaof_in_progress', 'total_connections_received', 'total_commands_processed', 'expired_keys', 'hash_max_zipmap_entries', 'hash_max_zipmap_value', 'pubsub_channels', 'pubsub_patterns', 'vm_enabled', 'role'].forEach( function (key) { assert.include(info, key); assert.isString(info[key]); });
"it works": function(err, feed) { var maven; assert.ifError(err); assert.isObject(feed); assert.include(feed, "items"); assert.isArray(feed.items); assert.greater(feed.items.length, 0); assert.isObject(feed.items[0]); maven = feed.items[0]; assert.include(maven, "id"); assert.equal(maven.id, "acct:maven@social.localhost"); assert.include(maven, "followers"); assert.isObject(maven.followers); assert.include(maven.followers, "url"); assert.equal(serverOf(maven.followers.url), "social.localhost"); assert.include(maven, "following"); assert.isObject(maven.following); assert.include(maven.following, "url"); assert.equal(serverOf(maven.following.url), "social.localhost"); assert.include(maven, "favorites"); assert.isObject(maven.favorites); assert.include(maven.favorites, "url"); assert.equal(serverOf(maven.favorites.url), "social.localhost"); assert.include(maven, "lists"); assert.isObject(maven.lists); assert.include(maven.lists, "url"); assert.equal(serverOf(maven.lists.url), "social.localhost"); assert.include(maven, "links"); assert.isObject(maven.links); assert.include(maven.links, "self"); assert.isObject(maven.links.self); assert.include(maven.links.self, "href"); assert.equal(serverOf(maven.links.self.href), "social.localhost"); assert.include(maven.links, "activity-inbox"); assert.isObject(maven.links["activity-inbox"]); assert.include(maven.links["activity-inbox"], "href"); assert.equal(serverOf(maven.links["activity-inbox"].href), "social.localhost"); assert.include(maven.links, "self"); assert.isObject(maven.links["activity-outbox"]); assert.include(maven.links["activity-outbox"], "href"); assert.equal(serverOf(maven.links["activity-outbox"].href), "social.localhost"); }
'should raise warning': function(error, stdout, stderr) { assert.include(stderr, 'Broken @import declaration of "http://localhost:24682/timeout.css" - timeout'); },
"posted item is person": function(err, posted, users) { assert.ifError(err); assert.isObject(posted); assert.include(posted, "id"); assert.equal(users.costello.profile.id, posted.id); },
'should output inlining info': function(error, stdout, stderr) { assert.include(stderr, path.join(process.cwd(), 'test/data/imports-min.css')); }
'should respond with index': function (err, res, body) { assert.equal(res.statusCode, 200); assert.include(body, '/file'); assert.include(body, '/canYouSeeMe'); }
"it looks correct": function(err, list, comment1, comment2) { assert.isArray(list); assert.lengthOf(list, 1); assert.equal(list[0].id, comment1.id); assert.include(list[0], "replies"); }
"it works": function(err, cl) { assert.ifError(err); assert.isObject(cl); assert.include(cl, "client_id"); assert.include(cl, "client_secret"); },
var assertValidList = function(doc, total, count) { assert.include(doc, "author"); assert.include(doc.author, "id"); assert.include(doc.author, "displayName"); assert.include(doc.author, "objectType"); assert.include(doc, "totalItems"); assert.include(doc, "items"); assert.include(doc, "displayName"); assert.include(doc, "id"); assert.include(doc, "itemsPerPage"); assert.include(doc, "startIndex"); assert.include(doc, "links"); assert.include(doc.links, "current"); assert.include(doc.links.current, "href"); assert.include(doc.links, "self"); assert.include(doc.links.self, "href"); assert.include(doc, "objectTypes"); assert.include(doc.objectTypes, "person"); if (_(total).isNumber()) { assert.equal(doc.totalItems, total); } if (_(count).isNumber()) { assert.lengthOf(doc.items, count); } };
"should contain the 'rabbits' and 'pigs' databases": function (dbs) { assert.isArray(dbs); assert.include(dbs, 'rabbits'); assert.include(dbs, 'pigs'); }
"has a map of the available services" : function() { assert.include(serviceManager, "serviceMap"); assert.include(serviceManager.serviceMap(), "available"); assert.include(serviceManager.serviceMap(), "installed"); },
'should output correct info': function(error, stdout, stderr) { assert.include(stderr, 'Original: 120 bytes'); assert.include(stderr, 'Minified: 86 bytes'); assert.include(stderr, 'Efficiency: 28.33%'); }
"and testURLCallback exists": function() { assert.include(serviceManager.serviceMap().installed, "testURLCallback"); assert.isTrue(serviceManager.isInstalled("testURLCallback")); },
'should rebase urls correctly': function() { var minimized = readFile('./test/data/129-assets/assets/ui.bundled.css'); assert.include(minimized, 'url(../components/bootstrap/images/glyphs.gif)'); assert.include(minimized, 'url(../components/jquery-ui/images/prev.gif)'); assert.include(minimized, 'url(../components/jquery-ui/images/next.gif)'); },
"it is an application": function(err, obj) { assert.ifError(err); assert.isObject(obj); assert.include(obj, "objectType"); assert.equal(obj.objectType, "application"); }
'should rebase urls correctly': function(error, stdout) { assert.equal(error, null); assert.include(stdout, 'url(../components/bootstrap/images/glyphs.gif)'); assert.include(stdout, 'url(../components/jquery-ui/images/prev.gif)'); assert.include(stdout, 'url(../components/jquery-ui/images/next.gif)'); }
"it has the host as ID": function(err, obj) { assert.ifError(err); assert.isObject(obj); assert.include(obj, "id"); assert.equal(obj.id, "http://photo.example/"); }
"it has a prev link": function(err, feed) { assert.ifError(err); assert.include(feed, "links"); assert.include(feed.links, "prev"); assert.include(feed.links.prev, "href"); },