GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — test: show pending exception error in napi tests · nodejs/node@bebcdfe

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • test/addons-napi/test_exception
    • test.js
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎test/addons-napi/test_exception/test.js‎

Copy file name to clipboardExpand all lines: test/addons-napi/test_exception/test.js
+8-6Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,10 @@ const theError = new Error('Some error');
2020

2121
// Test that the exception thrown above was marked as pending
2222
// before it was handled on the JS side
23-
assert.strictEqual(test_exception.wasPending(), true,
24-
'VM was marked as having an exception pending' +
25-
' when it was allowed through');
23+
const exception_pending = test_exception.wasPending();
24+
assert.strictEqual(exception_pending, true,
25+
'Exception not pending as expected,' +
26+
` .wasPending() returned ${exception_pending}`);
2627

2728
// Test that the native side does not capture a non-existing exception
2829
returnedError = test_exception.returnException(common.mustCall());
@@ -44,7 +45,8 @@ const theError = new Error('Some error');
4445
` ${caughtError} was passed`);
4546

4647
// Test that the exception state remains clear when no exception is thrown
47-
assert.strictEqual(test_exception.wasPending(), false,
48-
'VM was not marked as having an exception pending' +
49-
' when none was allowed through');
48+
const exception_pending = test_exception.wasPending();
49+
assert.strictEqual(exception_pending, false,
50+
'Exception state did not remain clear as expected,' +
51+
` .wasPending() returned ${exception_pending}`);
5052
}

0 commit comments

Comments
0 (0)
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.