You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
529 B

'use strict'
var hasOwnProperty = Object.prototype.hasOwnProperty
module.exports = function shape (t, manifest) {
t.ok(isObject(manifest), 'manifest is object')
t.ok(isObject(manifest.additionalMethods), 'additionalMethods is object')
for (var k in manifest) {
if (!hasOwnProperty.call(manifest, k)) continue
if (manifest[k]) {
t.ok(manifest[k], 'truthy: ' + k)
} else {
t.is(manifest[k], false, 'false: ' + k)
}
}
}
function isObject (o) {
return typeof o === 'object' && o !== null
}