From cc2f68b3e007afd055df410356e75202f3b40474 Mon Sep 17 00:00:00 2001 From: Denis Bardadym Date: Sat, 28 Oct 2017 14:11:10 +0300 Subject: [PATCH] Release 13.1.3 --- History.md | 5 +++++ package.json | 22 +++++----------------- should.js | 4 ++-- 3 files changed, 12 insertions(+), 19 deletions(-) diff --git a/History.md b/History.md index 353dcb8..4e1d63a 100644 --- a/History.md +++ b/History.md @@ -1,3 +1,8 @@ +13.1.3 / 2017-10-28 +=================== + + * Fix weird bug in `.containDeep` when given object is string (see \#157) + 13.1.2 / 2017-10-10 =================== diff --git a/package.json b/package.json index a5464ad..391347d 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "should", "description": "test framework agnostic BDD-style assertions", - "version": "13.1.2", + "version": "13.1.3", "author": "TJ Holowaychuk , Denis Bardadym ", "typings": "./should.d.ts", "repository": { @@ -16,7 +16,8 @@ "prepare": "npm run build && npm run build:umd && npm run build:cjs:as-function", "pretest": "npm run build", "build:cjs:as-function": "rollup --input ./lib/should.js --output.format=cjs --output.file ./as-function.js", - "test": "mocha -R mocha-better-spec-reporter --require ./cjs/should --color --check-leaks ./test/*.test.js ./test/**/*.test.js", + "test": + "mocha -R mocha-better-spec-reporter --require ./cjs/should --color --check-leaks ./test/*.test.js ./test/**/*.test.js", "zuul": "zuul -- ./test/**/*.test.js ./test/*.test.js", "build:umd": "rollup -c rollup.config.js --input ./lib/umd.js --output.format=iife --output.file ./should.js" }, @@ -33,12 +34,7 @@ "typescript": "^2.5.3", "zuul": "latest" }, - "keywords": [ - "test", - "bdd", - "assert", - "should" - ], + "keywords": ["test", "bdd", "assert", "should"], "main": "./cjs/should.js", "module": "./es6/should.js", "license": "MIT", @@ -49,13 +45,5 @@ "should-type-adaptors": "^1.0.1", "should-util": "^1.0.0" }, - "files": [ - "cjs/*", - "es6/*", - "as-function.js", - "should.js", - "LICENSE", - "*.md", - "should.d.ts" - ] + "files": ["cjs/*", "es6/*", "as-function.js", "should.js", "LICENSE", "*.md", "should.d.ts"] } diff --git a/should.js b/should.js index e42809b..3ed924b 100644 --- a/should.js +++ b/should.js @@ -1,6 +1,6 @@ /*! * should - test framework agnostic BDD-style assertions - * @version v13.1.2 + * @version v13.1.3 * @author TJ Holowaychuk , Denis Bardadym * @link https://github.com/shouldjs/should.js * @license MIT @@ -3428,7 +3428,7 @@ var containAssertions = function(should, Assertion) { this.params = { operator: "to contain " + i(other) }; var obj = this.obj; - if (typeof obj == "string") { + if (typeof obj === "string" && typeof other === "string") { // expect other to be string this.is.equal(String(other)); } else if (isIterable(obj) && isIterable(other)) {