Socket
Socket
Sign inDemoInstall

chai

Package Overview
Dependencies
Maintainers
1
Versions
96
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

chai - npm Package Compare versions

Comparing version 1.4.0 to 1.4.1

9

History.md
1.4.1 / 2012-12-21
==================
* showDiff: force diff for equal and eql. #106
* test: [expect] type null. #122
* Merge pull request #115 from eshao/fix-assert-Throw
* FIX: assert.Throw checks error type/message
* TST: assert.Throw should check error type/message
1.4.0 / 2012-11-29

@@ -3,0 +12,0 @@ ==================

2

lib/chai.js

@@ -14,3 +14,3 @@ /*!

exports.version = '1.4.0';
exports.version = '1.4.1';

@@ -17,0 +17,0 @@ /*!

@@ -85,4 +85,5 @@ /*!

Assertion.prototype.assert = function (expr, msg, negateMsg, expected, _actual) {
Assertion.prototype.assert = function (expr, msg, negateMsg, expected, _actual, showDiff) {
var ok = util.test(this, arguments);
if (true !== showDiff) showDiff = false;

@@ -97,2 +98,3 @@ if (!ok) {

, stackStartFunction: (Assertion.includeStack) ? this.assert : flag(this, 'ssfi')
, showDiff: showDiff
});

@@ -99,0 +101,0 @@ }

@@ -380,2 +380,4 @@ /*!

, val
, this._obj
, true
);

@@ -410,2 +412,4 @@ }

, obj
, this._obj
, true
);

@@ -412,0 +416,0 @@ });

@@ -36,2 +36,3 @@ /*!

this.operator = options.operator;
this.showDiff = options.showDiff;

@@ -38,0 +39,0 @@ if (options.stackStartFunction && Error.captureStackTrace) {

@@ -863,3 +863,3 @@ /*!

/**
* ### .throws(function, [constructor/regexp], [message])
* ### .throws(function, [constructor/string/regexp], [string/regexp], [message])
*

@@ -870,3 +870,7 @@ * Asserts that `function` will throw an error that is an instance of

*
* assert.throw(fn, 'function throws a reference error');
* assert.throw(fn, /function throws a reference error/);
* assert.throw(fn, ReferenceError);
* assert.throw(fn, ReferenceError, 'function throws a reference error');
* assert.throw(fn, ReferenceError, /function throws a reference error/);
*

@@ -884,9 +888,9 @@ * @name throws

assert.Throw = function (fn, type, msg) {
if ('string' === typeof type) {
msg = type;
type = null;
assert.Throw = function (fn, errt, errs, msg) {
if ('string' === typeof errt || errt instanceof RegExp) {
errs = errt;
errt = null;
}
new Assertion(fn, msg).to.Throw(type);
new Assertion(fn, msg).to.Throw(errt, errs);
};

@@ -893,0 +897,0 @@

@@ -14,3 +14,3 @@ {

],
"version": "1.4.0",
"version": "1.4.1",
"repository": {

@@ -17,0 +17,0 @@ "type": "git",

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