mirror of
https://github.com/nodejs/node.git
synced 2024-12-01 16:10:02 +01:00
f7b5eacaa6
PR-URL: https://github.com/nodejs/node/pull/29886 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
26 lines
598 B
JavaScript
26 lines
598 B
JavaScript
'use strict';
|
|
|
|
const common = require('../common');
|
|
common.skipIfInspectorDisabled();
|
|
|
|
(async function test() {
|
|
const assert = require('assert');
|
|
const { Session } = require('inspector');
|
|
const { promisify } = require('util');
|
|
|
|
const session = new Session();
|
|
session.connect();
|
|
session.post = promisify(session.post);
|
|
await assert.rejects(
|
|
session.post('Runtime.evaluate', {
|
|
expression: 'for(;;);',
|
|
timeout: 0
|
|
}),
|
|
{
|
|
code: 'ERR_INSPECTOR_COMMAND',
|
|
message: 'Inspector error -32000: Execution was terminated'
|
|
}
|
|
);
|
|
session.disconnect();
|
|
})();
|