@pheasantplucker/failables
Advanced tools
Comparing version 2.0.5 to 2.0.6
{ | ||
"name": "@pheasantplucker/failables", | ||
"version": "2.0.5", | ||
"version": "2.0.6", | ||
"description": "to protect against null and throwing errors", | ||
@@ -5,0 +5,0 @@ "main": "src/failable.js", |
@@ -43,3 +43,3 @@ const equal = require('assert').deepEqual | ||
equal(isFailure(f), true) | ||
if (p) equal(payload(f), p) | ||
if (p !== undefined) equal(payload(f), p) | ||
} | ||
@@ -46,0 +46,0 @@ |
@@ -141,4 +141,5 @@ const equal = require('assert').deepEqual | ||
}) | ||
it('should fail success with wrong payload', () => { | ||
it('should fail success with wrong boolean payload', () => { | ||
throws(() => assertSuccess(success(true), false)) | ||
throws(() => assertSuccess(success(false), true)) | ||
}) | ||
@@ -163,2 +164,6 @@ }) | ||
}) | ||
it('should fail failure with wrong boolean payload', () => { | ||
throws(() => assertFailure(failure(true), false)) | ||
throws(() => assertFailure(failure(false), true)) | ||
}) | ||
}) | ||
@@ -165,0 +170,0 @@ |
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
13849
345