| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent d8a2125 commit 99fb6d4
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -831,7 +831,7 @@ function expectsError(stackStartFn, actual, error, message) { | |||
| 831 | 831 | details += ` (${error.name})`; | |
| 832 | 832 | } | |
| 833 | 833 | details += message ? `: ${message}` : '.'; | |
| 834 | - const fnType = stackStartFn.name === 'rejects' ? 'rejection' : 'exception'; | ||
| 834 | + const fnType = stackStartFn === assert.rejects ? 'rejection' : 'exception'; | ||
| 835 | 835 | innerFail({ | |
| 836 | 836 | actual: undefined, | |
| 837 | 837 | expected: error, | |
@@ -878,7 +878,7 @@ function expectsNoError(stackStartFn, actual, error, message) { | |||
| 878 | 878 | ||
| 879 | 879 | if (!error || hasMatchingError(actual, error)) { | |
| 880 | 880 | const details = message ? `: ${message}` : '.'; | |
| 881 | - const fnType = stackStartFn.name === 'doesNotReject' ? | ||
| 881 | + const fnType = stackStartFn === assert.doesNotReject ? | ||
| 882 | 882 | 'rejection' : 'exception'; | |
| 883 | 883 | innerFail({ | |
| 884 | 884 | actual, | |
@@ -998,7 +998,7 @@ function internalMatch(string, regexp, message, fn) { | |||
| 998 | 998 | 'regexp', 'RegExp', regexp | |
| 999 | 999 | ); | |
| 1000 | 1000 | } | |
| 1001 | - const match = fn.name === 'match'; | ||
| 1001 | + const match = fn === assert.match; | ||
| 1002 | 1002 | if (typeof string !== 'string' || | |
| 1003 | 1003 | RegExpPrototypeTest(regexp, string) !== match) { | |
| 1004 | 1004 | if (message instanceof Error) { | |
| Back | FazBrowse Home | New Git URL |
0 commit comments