���� JFIF �� � ( %"1"%)+...383,7(-.-
![]() Server : Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/7.4.20 System : Linux st2.domain.com 3.10.0-1127.10.1.el7.x86_64 #1 SMP Wed Jun 3 14:28:03 UTC 2020 x86_64 User : apache ( 48) PHP Version : 7.4.20 Disable Function : NONE Directory : /home/real/node-v13.0.1/test/sequential/ |
'use strict'; const common = require('../common'); common.skipIfInspectorDisabled(); const { Session } = require('inspector'); const { inspect } = require('util'); const session = new Session(); common.expectsError( () => session.post('Runtime.evaluate', { expression: '2 + 2' }), { code: 'ERR_INSPECTOR_NOT_CONNECTED', type: Error, message: 'Session is not connected' } ); session.connect(); session.post('Runtime.evaluate', { expression: '2 + 2' }); [1, {}, [], true, Infinity, undefined].forEach((i) => { common.expectsError( () => session.post(i), { code: 'ERR_INVALID_ARG_TYPE', type: TypeError, message: 'The "method" argument must be of type string. ' + `Received type ${typeof i}` } ); }); [1, true, Infinity].forEach((i) => { common.expectsError( () => session.post('test', i), { code: 'ERR_INVALID_ARG_TYPE', type: TypeError, message: 'The "params" argument must be of type Object. ' + `Received type ${typeof i}` } ); }); [1, 'a', {}, [], true, Infinity].forEach((i) => { common.expectsError( () => session.post('test', {}, i), { code: 'ERR_INVALID_CALLBACK', type: TypeError, message: `Callback must be a function. Received ${inspect(i)}` } ); }); common.expectsError( () => session.connect(), { code: 'ERR_INSPECTOR_ALREADY_CONNECTED', type: Error, message: 'The inspector session is already connected' } ); session.disconnect(); // Calling disconnect twice should not throw. session.disconnect();