Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 3571e13

Browse filesBrowse files
Trottaddaleax
authored andcommitted
test: check for session.post() errors in test-insepctor-context
If session.post() generates an error, it is currently ignored. Add check for error by adding a callback to session.post() invocation. PR-URL: #30649 Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com> Reviewed-By: Denys Otrishko <shishugi@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
1 parent 3769632 commit 3571e13
Copy full SHA for 3571e13

File tree

Expand file treeCollapse file tree

1 file changed

+3
-3
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+3
-3
lines changed
Open diff view settings
Collapse file

‎test/sequential/test-inspector-contexts.js‎

Copy file name to clipboardExpand all lines: test/sequential/test-inspector-contexts.js
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
const common = require('../common');
66
common.skipIfInspectorDisabled();
77

8-
const { strictEqual } = require('assert');
8+
const { ifError, strictEqual } = require('assert');
99
const { createContext, runInNewContext } = require('vm');
1010
const { Session } = require('inspector');
1111

@@ -22,7 +22,7 @@ async function testContextCreatedAndDestroyed() {
2222
const mainContextPromise =
2323
notificationPromise('Runtime.executionContextCreated');
2424

25-
session.post('Runtime.enable');
25+
session.post('Runtime.enable', assert.ifError);
2626
const contextCreated = await mainContextPromise;
2727
const { name, origin, auxData } = contextCreated.params.context;
2828
if (common.isSunOS || common.isWindows) {
@@ -148,7 +148,7 @@ async function testContextCreatedAndDestroyed() {
148148

149149
async function testBreakpointHit() {
150150
console.log('Testing breakpoint is hit in a new context');
151-
session.post('Debugger.enable');
151+
session.post('Debugger.enable', assert.ifError);
152152

153153
const pausedPromise = notificationPromise('Debugger.paused');
154154
runInNewContext('debugger', {});

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.