Comparing version 2.3.2 to 2.3.3
@@ -0,1 +1,7 @@ | ||
### 2.3.3 | ||
* fix: don't try to require('diff') for browsers - **[@dbushong](https://github.com/dbushong)** [#34](https://github.com/groupon/assertive/pull/34) | ||
- [`bf8e03a`](https://github.com/groupon/assertive/commit/bf8e03a22da8f584df54f07264f96eaedc0418fb) **fix:** don't try to require('diff') for browsers | ||
### 2.3.2 | ||
@@ -2,0 +8,0 @@ |
@@ -78,8 +78,4 @@ 'use strict'; | ||
// we can make this optional for browser use | ||
var jsDiff = void 0; | ||
// eslint-disable-next-line global-require | ||
try { | ||
jsDiff = require('diff'); | ||
} catch (err) {/* */} | ||
// may be stubbed out for browsers | ||
var jsDiff = require('diff'); | ||
@@ -327,3 +323,3 @@ var toString = Object.prototype.toString; | ||
message = 'deepEqual ' + green(rightLooks) + ' failed on something that\n' + 'serializes to the same result (likely some function)'; | ||
} else if (jsDiff) { | ||
} else { | ||
var values = jsDiff.diffJson(actual, expected).map(function (entry) { | ||
@@ -338,4 +334,2 @@ var value = entry.value; | ||
message = 'Actual: ' + red('-') + ' Expected: ' + green('+') + '\n' + values.join('\n'); | ||
} else { | ||
message = 'Expected: ' + green(rightLooks) + '\n Actually: ' + ('' + red(wrongLooks)); | ||
} | ||
@@ -342,0 +336,0 @@ |
{ | ||
"name": "assertive", | ||
"version": "2.3.2", | ||
"version": "2.3.3", | ||
"description": "Assertive is a terse yet expressive assertion library", | ||
@@ -27,2 +27,5 @@ "license": "BSD-3-Clause", | ||
}, | ||
"browser": { | ||
"diff": "./lib/diff-stub.js" | ||
}, | ||
"dependencies": { | ||
@@ -29,0 +32,0 @@ "diff": "^3.3.0", |
Sorry, the diff of this file is not supported yet
73286
8
525