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

Commit

Permalink
Release 11.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
btd committed Oct 10, 2016
1 parent 5487a80 commit 63c9b56
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 13 deletions.
5 changes: 5 additions & 0 deletions History.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
11.1.1 / 2016-10-10
===================

* Update modules

11.1.0 / 2016-08-14
===================

Expand Down
6 changes: 3 additions & 3 deletions 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": "11.1.0",
"version": "11.1.1",
"author": "TJ Holowaychuk <[email protected]>, Denis Bardadym <[email protected]> and other contributors",
"repository": {
"type": "git",
Expand Down Expand Up @@ -38,9 +38,9 @@
"license": "MIT",
"dependencies": {
"should-equal": "^1.0.0",
"should-format": "^3.0.1",
"should-format": "^3.0.2",
"should-type": "^1.4.0",
"should-type-adaptors": "^1.0.0",
"should-type-adaptors": "^1.0.1",
"should-util": "^1.0.0"
},
"files": [
Expand Down
19 changes: 9 additions & 10 deletions should.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*!
* should - test framework agnostic BDD-style assertions
* @version v11.1.0
* @version v11.1.1
* @author TJ Holowaychuk <[email protected]>, Denis Bardadym <[email protected]> and other contributors
* @link https://github.com/shouldjs/should.js
* @license MIT
Expand Down Expand Up @@ -702,8 +702,7 @@

var defaultTypeAdaptorStorage = new TypeAdaptorStorage();

// default for objects
defaultTypeAdaptorStorage.addType(new getGlobalType.Type(getGlobalType.OBJECT), {
var objectAdaptor = {
forEach: function(obj, f, context) {
for (var prop in obj) {
if (hasOwnProperty$1(obj, prop) && propertyIsEnumerable(obj, prop)) {
Expand All @@ -725,7 +724,11 @@
iterator: function(obj) {
return new ObjectIterator(obj);
}
});
};

// default for objects
defaultTypeAdaptorStorage.addType(new getGlobalType.Type(getGlobalType.OBJECT), objectAdaptor);
defaultTypeAdaptorStorage.addType(new getGlobalType.Type(getGlobalType.FUNCTION), objectAdaptor);

var mapAdaptor = {
has: function(obj, key) {
Expand Down Expand Up @@ -918,7 +921,7 @@
format: function(value) {
var tp = getGlobalType(value);

if (tp.type === getGlobalType.OBJECT && this.alreadySeen(value)) {
if (this.alreadySeen(value)) {
return '[Circular]';
}

Expand Down Expand Up @@ -1148,11 +1151,7 @@
}

function formatFunction(value) {
var obj = {};
Object.keys(value).forEach(function(key) {
obj[key] = value[key];
});
return formatPlainObject.call(this, obj, {
return formatPlainObject.call(this, value, {
prefix: 'Function',
additionalKeys: [['name', functionName$1(value)]]
});
Expand Down

0 comments on commit 63c9b56

Please sign in to comment.