| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 9abbb6b commit 5e6b42e
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -90,9 +90,9 @@ function createErrDiff(actual, expected, operator) { | |||
| 90 | 90 | var skipped = false; | |
| 91 | 91 | const util = lazyUtil(); | |
| 92 | 92 | const actualLines = util | |
| 93 | - .inspect(actual, { compact: false }).split('\n'); | ||
| 93 | + .inspect(actual, { compact: false, customInspect: false }).split('\n'); | ||
| 94 | 94 | const expectedLines = util | |
| 95 | - .inspect(expected, { compact: false }).split('\n'); | ||
| 95 | + .inspect(expected, { compact: false, customInspect: false }).split('\n'); | ||
| 96 | 96 | const msg = `Input A expected to ${operator} input B:\n` + | |
| 97 | 97 | `${green}+ expected${white} ${red}- actual${white}`; | |
| 98 | 98 | const skippedMsg = ' ... Lines skipped'; | |
@@ -235,8 +235,10 @@ class AssertionError extends Error { | |||
| 235 | 235 | } else if (errorDiff === 1) { | |
| 236 | 236 | // In case the objects are equal but the operator requires unequal, show | |
| 237 | 237 | // the first object and say A equals B | |
| 238 | - const res = util | ||
| 239 | - .inspect(actual, { compact: false }).split('\n'); | ||
| 238 | + const res = util.inspect( | ||
| 239 | + actual, | ||
| 240 | + { compact: false, customInspect: false } | ||
| 241 | + ).split('\n'); | ||
| 240 | 242 | ||
| 241 | 243 | if (res.length > 20) { | |
| 242 | 244 | res[19] = '...'; | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -899,7 +899,11 @@ common.expectsError( | |||
| 899 | 899 | message: `${start}\n` + | |
| 900 | 900 | `${actExp}\n` + | |
| 901 | 901 | '\n' + | |
| 902 | - ' {}' | ||
| 902 | + `${minus} {}\n` + | ||
| 903 | + `${plus} {\n` + | ||
| 904 | + `${plus} loop: 'forever',\n` + | ||
| 905 | + `${plus} [Symbol(util.inspect.custom)]: [Function]\n` + | ||
| 906 | + `${plus} }` | ||
| 903 | 907 | }); | |
| 904 | 908 | ||
| 905 | 909 | // notDeepEqual tests | |
| Back | FazBrowse Home | New Git URL |
0 commit comments