Skip to content
This repository has been archived by the owner on Nov 4, 2020. It is now read-only.

Commit

Permalink
Release 8.3.2
Browse files Browse the repository at this point in the history
  • Loading branch information
btd committed May 18, 2016
1 parent 3014e39 commit df8a931
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 17 deletions.
5 changes: 5 additions & 0 deletions History.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
8.3.2 / 2016-05-18
==================

* Fix for `should-equal` to do not call .toString when checking circular usage

8.3.1 / 2016-04-15
==================

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "should",
"description": "test framework agnostic BDD-style assertions",
"version": "8.3.1",
"version": "8.3.2",
"author": "TJ Holowaychuk <tj@vision-media.ca>, Denis Bardadym <bardadymchik@gmail.com> and other contributors",
"repository": {
"type": "git",
Expand Down
23 changes: 10 additions & 13 deletions should.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

/*!
* should - test framework agnostic BDD-style assertions
* @version v8.3.1
* @version v8.3.2
* @author TJ Holowaychuk <tj@vision-media.ca>, Denis Bardadym <bardadymchik@gmail.com> and other contributors
* @link https://github.com/shouldjs/should.js
* @license MIT
Expand Down Expand Up @@ -3216,8 +3216,8 @@ function eqInternal(a, b, opts, stackA, stackB, path, fails) {

l = stackA.length;
while(l--) {
if(stackA[l] == a) {
return result(stackB[l] == b, REASON.CIRCULAR_VALUES);
if(stackA[l] === a) {
return result(stackB[l] === b, REASON.CIRCULAR_VALUES);
}
}

Expand Down Expand Up @@ -3280,18 +3280,15 @@ var defaultOptions = {

function eq(a, b, opts) {
opts = opts || {};
if(typeof opts.checkProtoEql !== 'boolean') {
opts.checkProtoEql = defaultOptions.checkProtoEql;
}
if(typeof opts.checkSubType !== 'boolean') {
opts.checkSubType = defaultOptions.checkSubType;
}
if(typeof opts.plusZeroAndMinusZeroEqual !== 'boolean') {
opts.plusZeroAndMinusZeroEqual = defaultOptions.plusZeroAndMinusZeroEqual;
}

var newOpts = {
checkProtoEql: typeof opts.checkProtoEql !== 'boolean' ? defaultOptions.checkProtoEql : opts.checkProtoEql,
checkSubType: typeof opts.checkSubType !== 'boolean' ? defaultOptions.checkSubType : opts.checkSubType,
plusZeroAndMinusZeroEqual: typeof opts.plusZeroAndMinusZeroEqual !== 'boolean' ? defaultOptions.plusZeroAndMinusZeroEqual : opts.plusZeroAndMinusZeroEqual,
};

var fails = [];
var r = eqInternal(a, b, opts, [], [], [], fails);
var r = eqInternal(a, b, newOpts, [], [], [], fails);
return opts.collectAllFails ? fails : r;
}

Expand Down
6 changes: 3 additions & 3 deletions should.min.js

Large diffs are not rendered by default.

0 comments on commit df8a931

Please sign in to comment.