Comparing version 5.4.0 to 5.4.1
@@ -15,2 +15,5 @@ 'use strict'; | ||
var is = require('object-is'); | ||
var objectKeys = require('object-keys'); | ||
var every = require('array.prototype.every'); | ||
var isEnumerable = callBound('Object.prototype.propertyIsEnumerable'); | ||
@@ -655,6 +658,6 @@ var toLowerCase = callBound('String.prototype.toLowerCase'); | ||
} else if (isRegExp(expected)) { | ||
passed = expected.test(caught.error); | ||
passed = $test(expected, caught.error); | ||
expected = inspect(expected); | ||
} else if (expected && typeof expected === 'object') { // Handle validation objects. | ||
var keys = Object.keys(expected); | ||
var keys = objectKeys(expected); | ||
// Special handle errors to make sure the name and the message are compared as well. | ||
@@ -666,3 +669,3 @@ if (expected instanceof Error) { | ||
} | ||
passed = keys.every(function (key) { | ||
passed = every(keys, function (key) { | ||
if (typeof caught.error[key] === 'string' && isRegExp(expected[key]) && $test(expected[key], caught.error[key])) { | ||
@@ -669,0 +672,0 @@ return true; |
{ | ||
"name": "tape", | ||
"version": "5.4.0", | ||
"version": "5.4.1", | ||
"description": "tap-producing test harness for node and browsers", | ||
@@ -28,2 +28,3 @@ "main": "index.js", | ||
"dependencies": { | ||
"array.prototype.every": "^1.1.3", | ||
"call-bind": "^1.0.2", | ||
@@ -43,2 +44,3 @@ "deep-equal": "^2.0.5", | ||
"object-is": "^1.1.5", | ||
"object-keys": "^1.1.1", | ||
"object.assign": "^4.1.2", | ||
@@ -51,5 +53,5 @@ "resolve": "^2.0.0-next.3", | ||
"devDependencies": { | ||
"@ljharb/eslint-config": "^20.1.0", | ||
"@ljharb/eslint-config": "^20.2.0", | ||
"array.prototype.flatmap": "^1.2.5", | ||
"aud": "^1.1.5", | ||
"aud": "^2.0.0", | ||
"concat-stream": "^1.6.2", | ||
@@ -59,3 +61,3 @@ "eclint": "^2.8.1", | ||
"es-value-fixtures": "^1.2.1", | ||
"eslint": "^8.5.0", | ||
"eslint": "^8.6.0", | ||
"falafel": "^2.2.4", | ||
@@ -70,3 +72,3 @@ "js-yaml": "^3.14.0", | ||
"prepublish": "!(type not-in-publish) || not-in-publish || npm run prepublishOnly", | ||
"prelint": "eclint check", | ||
"prelint": "eclint check $(git ls-files | xargs find 2> /dev/null | grep -vE 'node_modules|\\.git')", | ||
"lint": "eslint --ext .js,.cjs,.mjs . bin/*", | ||
@@ -73,0 +75,0 @@ "pretest": "npm run lint", |
Sorry, the diff of this file is not supported yet
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
254233
6602
21
143
+ Addedarray.prototype.every@^1.1.3
+ Addedobject-keys@^1.1.1
+ Addedarray.prototype.every@1.1.6(transitive)