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

unexpected

Package Overview
Dependencies
Maintainers
2
Versions
330
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

unexpected - npm Package Compare versions

Comparing version 2.1.6 to 2.1.7

13

lib/unexpected.es5.js

@@ -130,2 +130,6 @@ (function () {

isError: function (err) {
return typeof err === 'object' && Object.prototype.toString.call(err) === '[object Error]';
},
isDate: function (d) {

@@ -326,4 +330,9 @@ if (d instanceof Date) return true;

var isRegExp = utils.isRegExp;
var isError = utils.isError;
var isDate = utils.isDate;
function formatError(err) {
return '[' + Error.prototype.toString.call(err) + ']';
}
/**

@@ -383,2 +392,6 @@ * Inspects an object.

if (isError(value)) {
return formatError(value);
}
// Look up the keys of the object.

@@ -385,0 +398,0 @@ var visible_keys = getKeys(value);

4

package.json
{
"name": "unexpected",
"version": "2.1.6",
"version": "2.1.7",
"author": "Sune Sloth Simonsen <sune@we-knowhow.dk>",

@@ -23,3 +23,3 @@ "keywords": [

"jshint": "*",
"mocha": "=1.12.0",
"mocha": "=1.17.1",
"phantomjs": "=1.9.1-0",

@@ -26,0 +26,0 @@ "mocha-phantomjs": "=3.1.0",

@@ -15,4 +15,9 @@ /*global namespace*/

var isRegExp = utils.isRegExp;
var isError = utils.isError;
var isDate = utils.isDate;
function formatError(err) {
return '[' + Error.prototype.toString.call(err) + ']';
}
/**

@@ -72,2 +77,6 @@ * Inspects an object.

if (isError(value)) {
return formatError(value);
}
// Look up the keys of the object.

@@ -74,0 +83,0 @@ var visible_keys = getKeys(value);

@@ -61,2 +61,6 @@ /*global namespace*/

isError: function (err) {
return typeof err === 'object' && Object.prototype.toString.call(err) === '[object Error]';
},
isDate: function (d) {

@@ -63,0 +67,0 @@ if (d instanceof Date) return true;

@@ -56,2 +56,8 @@ /*global describe, it, expect*/

it('formats Error instances correctly when an assertion fails', function () {
expect(function () {
expect(new Error('error message'), 'to be a number');
}, 'to throw', "expected [Error: error message] to be a 'number'");
});
it('throws with a stack trace that has the calling function as the top frame when the assertion fails (if the environment supports it)', function () {

@@ -58,0 +64,0 @@ if (Error.captureStackTrace || 'stack' in new Error()) {

Sorry, the diff of this file is too big to display

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