Skip to content

Commit

Permalink
test: use destructuring on require
Browse files Browse the repository at this point in the history
PR-URL: nodejs#24455
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
  • Loading branch information
juanarbol authored and refack committed Jan 10, 2019
1 parent 729d43d commit 907ce9c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions test/tick-processor/test-tick-processor-polyfill-brokenfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ if (isCPPSymbolsNotMapped) {


const assert = require('assert');
const cp = require('child_process');
const { spawn, spawnSync } = require('child_process');
const path = require('path');
const fs = require('fs');
const { writeFileSync } = require('fs');

const LOG_FILE = path.join(tmpdir.path, 'tick-processor.log');
const RETRY_TIMEOUT = 150;
Expand All @@ -33,7 +33,7 @@ const code = `function f() {
};
f();`;

const proc = cp.spawn(process.execPath, [
const proc = spawn(process.execPath, [
'--no_logfile_per_isolate',
'--logfile=-',
'--prof',
Expand All @@ -49,8 +49,8 @@ proc.stdout.on('data', (chunk) => ticks += chunk);
function runPolyfill(content) {
proc.kill();
content += BROKEN_PART;
fs.writeFileSync(LOG_FILE, content);
const child = cp.spawnSync(
writeFileSync(LOG_FILE, content);
const child = spawnSync(
`${process.execPath}`,
[
'--prof-process', LOG_FILE
Expand Down

0 comments on commit 907ce9c

Please sign in to comment.