| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent db73d1c commit 24aeca7
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -245,7 +245,7 @@ function innerThrows(shouldThrow, block, expected, message) { | |||
| 245 | 245 | expected, | |
| 246 | 246 | operator: 'throws', | |
| 247 | 247 | message: `Missing expected exception${details}`, | |
| 248 | - stackStartFn: innerThrows | ||
| 248 | + stackStartFn: assert.throws | ||
| 249 | 249 | }); | |
| 250 | 250 | } | |
| 251 | 251 | if (expected && expectedException(actual, expected) === false) { | |
@@ -259,7 +259,7 @@ function innerThrows(shouldThrow, block, expected, message) { | |||
| 259 | 259 | expected, | |
| 260 | 260 | operator: 'doesNotThrow', | |
| 261 | 261 | message: `Got unwanted exception${details}\n${actual.message}`, | |
| 262 | - stackStartFn: innerThrows | ||
| 262 | + stackStartFn: assert.doesNotThrow | ||
| 263 | 263 | }); | |
| 264 | 264 | } | |
| 265 | 265 | throw actual; | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -634,6 +634,7 @@ testAssertionMessage({ a: NaN, b: Infinity, c: -Infinity }, | |||
| 634 | 634 | } catch (e) { | |
| 635 | 635 | threw = true; | |
| 636 | 636 | assert.strictEqual(e.message, 'Missing expected exception.'); | |
| 637 | + assert.ok(!e.stack.includes('throws'), e.stack); | ||
| 637 | 638 | } | |
| 638 | 639 | assert.ok(threw); | |
| 639 | 640 | } | |
@@ -678,6 +679,7 @@ try { | |||
| 678 | 679 | threw = true; | |
| 679 | 680 | assert.ok(e.message.includes(rangeError.message)); | |
| 680 | 681 | assert.ok(e instanceof assert.AssertionError); | |
| 682 | + assert.ok(!e.stack.includes('doesNotThrow'), e.stack); | ||
| 681 | 683 | } | |
| 682 | 684 | assert.ok(threw); | |
| 683 | 685 | } | |
| Back | FazBrowse Home | New Git URL |
0 commit comments