node/test/sequential/test-inspector-break-e.js
Shannon c1288fe432 test: fix parameter order passed to strictEqual
strictEqual() expects the first argument to be the actual value and the
second argument to be the expected value. This fix will correctly label
the AssertionError.:

PR-URL: https://github.com/nodejs/node/pull/23577
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Hitesh Kanwathirtha <digitalinfinity@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
2018-10-12 19:58:50 -07:00

23 lines
694 B
JavaScript

// Flags: --expose-internals
'use strict';
const common = require('../common');
common.skipIfInspectorDisabled();
const assert = require('assert');
const { NodeInstance } = require('../common/inspector-helper.js');
async function runTests() {
const instance = new NodeInstance(undefined, 'console.log(10)');
const session = await instance.connectInspectorSession();
await session.send([
{ 'method': 'Runtime.enable' },
{ 'method': 'Debugger.enable' },
{ 'method': 'Runtime.runIfWaitingForDebugger' }
]);
await session.waitForBreakOnLine(2, '[eval]');
await session.runToCompletion();
assert.strictEqual((await instance.expectShutdown()).exitCode, 0);
}
runTests();