unexpected
Advanced tools
Comparing version 5.1.5 to 5.1.6
@@ -71,4 +71,9 @@ var utils = require('./utils'); | ||
type = /^reg(?:exp?|ular expression)$/.test(type) ? 'regexp' : type; | ||
this.args[0] = expect.output.clone().strings(type); | ||
expect(subjectType.is(type), '[not] to be truthy'); | ||
} else { | ||
if (typeof type.name === 'string') { | ||
this.args[0] = expect.output.clone().strings(type.name); | ||
} | ||
expect(subject instanceof type, '[not] to be truthy'); | ||
@@ -206,5 +211,10 @@ } | ||
if (this.flags.not && keys.length === 0) { | ||
return; | ||
} | ||
var hasKeys = subject && keys.every(function (key) { | ||
return subject.hasOwnProperty(key); | ||
}); | ||
if (this.flags.only) { | ||
@@ -211,0 +221,0 @@ expect(hasKeys, 'to be truthy'); |
{ | ||
"name": "unexpected", | ||
"version": "5.1.5", | ||
"version": "5.1.6", | ||
"author": "Sune Sloth Simonsen <sune@we-knowhow.dk>", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
69
11769
1612257