unexpected
Advanced tools
Comparing version 4.1.5 to 4.1.6
@@ -44,2 +44,6 @@ var shim = require('./shim'); | ||
expect.addAssertion('to be defined', function (expect, subject) { | ||
expect(subject, 'not to be undefined'); | ||
}); | ||
expect.addAssertion('[not] to be NaN', function (expect, subject) { | ||
@@ -46,0 +50,0 @@ expect(isNaN(subject), '[not] to be true'); |
@@ -197,4 +197,15 @@ var Assertion = require('./Assertion'); | ||
this.types.unshift(extend({}, baseType, type, { baseType: baseType })); | ||
var extendedType = extend({}, baseType, type, { baseType: baseType }); | ||
var inspect = extendedType.inspect; | ||
extendedType.inspect = function () { | ||
if (arguments.length < 2) { | ||
return 'type: ' + type.name; | ||
} else { | ||
return inspect.apply(this, arguments); | ||
} | ||
}; | ||
this.types.unshift(extendedType); | ||
return this.expect; | ||
@@ -201,0 +212,0 @@ }; |
{ | ||
"name": "unexpected", | ||
"version": "4.1.5", | ||
"version": "4.1.6", | ||
"author": "Sune Sloth Simonsen <sune@we-knowhow.dk>", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -113,2 +113,5 @@ # Unexpected | ||
expect(undefined, 'to be undefined'); | ||
expect(null, 'to be defined'); | ||
expect(false, 'to be defined'); | ||
expect({}, 'to be defined'); | ||
``` | ||
@@ -115,0 +118,0 @@ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1102057
40
11848
638