Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

tape

Package Overview
Dependencies
Maintainers
4
Versions
158
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tape - npm Package Compare versions

Comparing version 4.15.0 to 4.15.1

8

lib/test.js

@@ -16,3 +16,3 @@ 'use strict';

var toLowerCase = callBound('String.prototype.toLowerCase');
var $test = callBound('RegExp.prototype.test');
var $exec = callBound('RegExp.prototype.exec');
var objectToString = callBound('Object.prototype.toString');

@@ -557,3 +557,3 @@

if (isRegExp(expected)) {
passed = $test(expected, caught && caught.error);
passed = $exec(expected, caught && caught.error) !== null;
expected = String(expected);

@@ -615,3 +615,3 @@ }

} else {
var matches = $test(regexp, string);
var matches = $exec(regexp, string) !== null;
var message = defined(

@@ -649,3 +649,3 @@ msg,

} else {
var matches = $test(regexp, string);
var matches = $exec(regexp, string) !== null;
var message = defined(

@@ -652,0 +652,0 @@ msg,

{
"name": "tape",
"version": "4.15.0",
"version": "4.15.1",
"description": "tap-producing test harness for node and browsers",

@@ -24,3 +24,3 @@ "main": "index.js",

"is-regex": "~1.1.4",
"minimist": "~1.2.5",
"minimist": "~1.2.6",
"object-inspect": "~1.12.0",

@@ -33,3 +33,3 @@ "resolve": "~1.22.0",

"devDependencies": {
"@ljharb/eslint-config": "^20.2.0",
"@ljharb/eslint-config": "^20.2.3",
"array.prototype.flatmap": "^1.2.5",

@@ -41,5 +41,6 @@ "aud": "^2.0.0",

"es-value-fixtures": "^1.2.1",
"eslint": "^8.7.0",
"eslint": "=8.8.0",
"falafel": "^2.2.4",
"js-yaml": "^3.14.0",
"npm-run-posix-or-windows": "^2.0.2",
"safe-publish-latest": "^2.0.0",

@@ -52,3 +53,6 @@ "tap": "^8.0.1",

"prepublish": "!(type not-in-publish) || not-in-publish || npm run prepublishOnly",
"prelint": "eclint check $(git ls-files 2>/dev/null | xargs find 2> /dev/null | grep -vE 'node_modules|\\.git' || echo '*.md *.js test/*.js')",
"prelint:files": "git ls-files 2>/dev/null | xargs find 2> /dev/null | grep -vE 'node_modules|\\.git' || echo '*.md *.js test/*.js'",
"eclint": "FILES=\"$(npm run --silent prelint:files)\" eclint check \"${FILES:=package.json}\"",
"eclint:windows": "eclint check *.js",
"prelint": "npm-run-posix-or-windows eclint",
"lint": "eslint --ext .js,.cjs,.mjs . bin/*",

@@ -55,0 +59,0 @@ "pretest": "npm run lint",

@@ -23,3 +23,3 @@ 'use strict';

' actual: |-',
' [Error: this is a message]',
' ' + ('cause' in Error.prototype ? '{ [Error: this is a message] [cause]: undefined }' : '[Error: this is a message]'),
' at: Test.<anonymous> ($TEST/error.js:$LINE:$COL)',

@@ -26,0 +26,0 @@ ' stack: |-',

@@ -17,2 +17,4 @@ 'use strict';

var inspected = 'cause' in Error.prototype ? '{ [Error: Preserve stack] [cause]: undefined }' : '[Error: Preserve stack]';
parser.once('assert', function (data) {

@@ -28,3 +30,3 @@ delete data.diag.at;

expected: 'undefined',
actual: '[Error: Preserve stack]'
actual: inspected
}

@@ -46,3 +48,3 @@ });

+ ' actual: |-\n'
+ ' [Error: Preserve stack]\n'
+ ' ' + inspected + '\n'
+ ' stack: |-\n'

@@ -63,3 +65,3 @@ + ' foo\n'

expected: 'undefined',
actual: '[Error: Preserve stack]'
actual: inspected
});

@@ -66,0 +68,0 @@ }));

@@ -29,2 +29,4 @@ 'use strict';

var maybeCause = 'cause' in Error.prototype ? '[cause]: undefined, ' : '';
var test = tape.createHarness();

@@ -41,3 +43,3 @@ test.createStream().pipe(concat(function (body) {

' actual: |-',
' { [TypeError: ' + getNonFunctionMessage() + "] message: '" + getNonFunctionMessage() + "' }",
' { [TypeError: ' + getNonFunctionMessage() + '] ' + maybeCause + "message: '" + getNonFunctionMessage() + "' }",
' at: Test.<anonymous> ($TEST/throws.js:$LINE:$COL)',

@@ -56,3 +58,3 @@ ' stack: |-',

' actual: |-',
' { [TypeError: ' + getNonFunctionMessage(null) + "] message: '" + getNonFunctionMessage(null) + "' }",
' { [TypeError: ' + getNonFunctionMessage(null) + '] ' + maybeCause + "message: '" + getNonFunctionMessage(null) + "' }",
' at: Test.<anonymous> ($TEST/throws.js:$LINE:$COL)',

@@ -71,3 +73,3 @@ ' stack: |-',

' actual: |-',
' { [TypeError: ' + getNonFunctionMessage(true) + "] message: '" + getNonFunctionMessage(true) + "' }",
' { [TypeError: ' + getNonFunctionMessage(true) + '] ' + maybeCause + "message: '" + getNonFunctionMessage(true) + "' }",
' at: Test.<anonymous> ($TEST/throws.js:$LINE:$COL)',

@@ -86,3 +88,3 @@ ' stack: |-',

' actual: |-',
' { [TypeError: ' + getNonFunctionMessage(false) + "] message: '" + getNonFunctionMessage(false) + "' }",
' { [TypeError: ' + getNonFunctionMessage(false) + '] ' + maybeCause + "message: '" + getNonFunctionMessage(false) + "' }",
' at: Test.<anonymous> ($TEST/throws.js:$LINE:$COL)',

@@ -101,3 +103,3 @@ ' stack: |-',

' actual: |-',
' { [TypeError: ' + getNonFunctionMessage('abc') + "] message: '" + getNonFunctionMessage('abc') + "' }",
' { [TypeError: ' + getNonFunctionMessage('abc') + '] ' + maybeCause + "message: '" + getNonFunctionMessage('abc') + "' }",
' at: Test.<anonymous> ($TEST/throws.js:$LINE:$COL)',

@@ -116,3 +118,3 @@ ' stack: |-',

' actual: |-',
' { [TypeError: ' + getNonFunctionMessage(/a/g) + "] message: '" + getNonFunctionMessage(/a/g) + "' }",
' { [TypeError: ' + getNonFunctionMessage(/a/g) + '] ' + maybeCause + "message: '" + getNonFunctionMessage(/a/g) + "' }",
' at: Test.<anonymous> ($TEST/throws.js:$LINE:$COL)',

@@ -131,3 +133,3 @@ ' stack: |-',

' actual: |-',
' { [TypeError: ' + getNonFunctionMessage([]) + "] message: '" + getNonFunctionMessage([]) + "' }",
' { [TypeError: ' + getNonFunctionMessage([]) + '] ' + maybeCause + "message: '" + getNonFunctionMessage([]) + "' }",
' at: Test.<anonymous> ($TEST/throws.js:$LINE:$COL)',

@@ -146,3 +148,3 @@ ' stack: |-',

' actual: |-',
' { [TypeError: ' + getNonFunctionMessage({}) + "] message: '" + getNonFunctionMessage({}) + "' }",
' { [TypeError: ' + getNonFunctionMessage({}) + '] ' + maybeCause + "message: '" + getNonFunctionMessage({}) + "' }",
' at: Test.<anonymous> ($TEST/throws.js:$LINE:$COL)',

@@ -181,3 +183,3 @@ ' stack: |-',

' actual: |-',
' { [RangeError: actual!] ' + ('cause' in Error.prototype ? '[cause]: undefined, ' : '') + "message: 'actual!' }",
' { [RangeError: actual!] ' + maybeCause + "message: 'actual!' }",
' at: Test.<anonymous> ($TEST/throws.js:$LINE:$COL)',

@@ -184,0 +186,0 @@ ' stack: |-',

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc