Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion test/eslint.config_partial.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,6 @@ export default [
files: [
'test/es-module/**/*.{js,mjs}',
'test/parallel/**/*.{js,mjs}',
'test/sequential/**/*.{js,mjs}',
],
rules: {
'@stylistic/js/comma-dangle': [
Expand All @@ -163,6 +162,23 @@ export default [
],
},
},
{
files: [
'test/sequential/**/*.{js,mjs}',
],
rules: {
'@stylistic/js/comma-dangle': [
'error',
{
arrays: 'always-multiline',
exports: 'always-multiline',
functions: 'only-multiline',
imports: 'always-multiline',
objects: 'always-multiline',
},
],
},
},
{
files: [
'test/{common,fixtures,wpt}/**/*.{js,mjs,cjs}',
Expand Down
2 changes: 1 addition & 1 deletion test/sequential/test-child-process-execsync.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,5 +156,5 @@ const args = [

// Verify the shell option works properly
execFileSync(`"${common.isWindows ? process.execPath : '$NODE'}"`, [], {
encoding: 'utf8', shell: true, env
encoding: 'utf8', shell: true, env,
});
2 changes: 1 addition & 1 deletion test/sequential/test-child-process-exit.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ if (gen === maxGen) {
}

const child = ch.spawn(process.execPath, [__filename, gen + 1], {
stdio: [ 'ignore', 'pipe', 'ignore' ]
stdio: [ 'ignore', 'pipe', 'ignore' ],
});
assert.ok(!child.stdin);
assert.ok(child.stdout);
Expand Down
2 changes: 1 addition & 1 deletion test/sequential/test-cli-syntax-require.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const syntaxErrorRE = /^SyntaxError: \b/m;

// stderr should include the filename
assert(output.startsWith(file), `${output} starts with ${file}`);
}
},
});
});
});
2 changes: 1 addition & 1 deletion test/sequential/test-cluster-inspect-brk.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ if (cluster.isPrimary) {

cluster.setupPrimary({
execArgv: execArgv,
stdio: ['pipe', 'pipe', 'pipe', 'ipc', 'pipe']
stdio: ['pipe', 'pipe', 'pipe', 'ipc', 'pipe'],
});

const worker = cluster.fork();
Expand Down
4 changes: 2 additions & 2 deletions test/sequential/test-cpu-prof-default.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const { spawnSync } = require('child_process');
const tmpdir = require('../common/tmpdir');
const {
getCpuProfiles,
env
env,
} = require('../common/cpu-prof');

{
Expand All @@ -25,7 +25,7 @@ const {
fixtures.path('workload', 'fibonacci.js'),
], {
cwd: tmpdir.path,
env
env,
});
if (output.status !== 0) {
console.log(output.stderr.toString());
Expand Down
4 changes: 2 additions & 2 deletions test/sequential/test-cpu-prof-dir-absolute.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const {
getCpuProfiles,
kCpuProfInterval,
env,
verifyFrames
verifyFrames,
} = require('../common/cpu-prof');

// relative --cpu-prof-dir
Expand All @@ -31,7 +31,7 @@ const {
fixtures.path('workload', 'fibonacci.js'),
], {
cwd: tmpdir.path,
env
env,
});
if (output.status !== 0) {
console.log(output.stderr.toString());
Expand Down
4 changes: 2 additions & 2 deletions test/sequential/test-cpu-prof-dir-and-name.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const {
getCpuProfiles,
kCpuProfInterval,
env,
verifyFrames
verifyFrames,
} = require('../common/cpu-prof');

{
Expand All @@ -34,7 +34,7 @@ const {
fixtures.path('workload', 'fibonacci.js'),
], {
cwd: tmpdir.path,
env
env,
});
if (output.status !== 0) {
console.log(output.stderr.toString());
Expand Down
4 changes: 2 additions & 2 deletions test/sequential/test-cpu-prof-dir-relative.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const {
getCpuProfiles,
kCpuProfInterval,
env,
verifyFrames
verifyFrames,
} = require('../common/cpu-prof');

// relative --cpu-prof-dir
Expand All @@ -30,7 +30,7 @@ const {
fixtures.path('workload', 'fibonacci.js'),
], {
cwd: tmpdir.path,
env
env,
});
if (output.status !== 0) {
console.log(output.stderr.toString());
Expand Down
4 changes: 2 additions & 2 deletions test/sequential/test-cpu-prof-dir-worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const {
getCpuProfiles,
kCpuProfInterval,
env,
getFrames
getFrames,
} = require('../common/cpu-prof');

// --cpu-prof-dir with worker
Expand All @@ -30,7 +30,7 @@ const {
fixtures.path('workload', 'fibonacci-worker.js'),
], {
cwd: tmpdir.path,
env
env,
});
if (output.status !== 0) {
console.log(output.stderr.toString());
Expand Down
4 changes: 2 additions & 2 deletions test/sequential/test-cpu-prof-drained.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const {
getCpuProfiles,
kCpuProfInterval,
env,
verifyFrames
verifyFrames,
} = require('../common/cpu-prof');

{
Expand All @@ -28,7 +28,7 @@ const {
fixtures.path('workload', 'fibonacci.js'),
], {
cwd: tmpdir.path,
env
env,
});
if (output.status !== 0) {
console.log(output.stderr.toString());
Expand Down
4 changes: 2 additions & 2 deletions test/sequential/test-cpu-prof-exit.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const {
getCpuProfiles,
kCpuProfInterval,
env,
verifyFrames
verifyFrames,
} = require('../common/cpu-prof');

{
Expand All @@ -27,7 +27,7 @@ const {
fixtures.path('workload', 'fibonacci-exit.js'),
], {
cwd: tmpdir.path,
env
env,
});
if (output.status !== 55) {
console.log(output.stderr.toString());
Expand Down
8 changes: 4 additions & 4 deletions test/sequential/test-cpu-prof-invalid-options.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const { spawnSync } = require('child_process');
const tmpdir = require('../common/tmpdir');
const {
kCpuProfInterval,
env
env,
} = require('../common/cpu-prof');

// --cpu-prof-name without --cpu-prof
Expand All @@ -24,7 +24,7 @@ const {
fixtures.path('workload', 'fibonacci.js'),
], {
cwd: tmpdir.path,
env
env,
});
const stderr = output.stderr.toString().trim();
if (output.status !== 9) {
Expand All @@ -45,7 +45,7 @@ const {
fixtures.path('workload', 'fibonacci.js'),
], {
cwd: tmpdir.path,
env
env,
});
const stderr = output.stderr.toString().trim();
if (output.status !== 9) {
Expand All @@ -66,7 +66,7 @@ for (const arg of [kCpuProfInterval, 'crashme']) {
fixtures.path('workload', 'fibonacci.js'),
], {
cwd: tmpdir.path,
env
env,
});
const stderr = output.stderr.toString().trim();
if (output.status !== 9) {
Expand Down
4 changes: 2 additions & 2 deletions test/sequential/test-cpu-prof-kill.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const {
getCpuProfiles,
kCpuProfInterval,
env,
verifyFrames
verifyFrames,
} = require('../common/cpu-prof');

{
Expand All @@ -27,7 +27,7 @@ const {
fixtures.path('workload', 'fibonacci-sigint.js'),
], {
cwd: tmpdir.path,
env
env,
});
if (!common.isWindows) {
if (output.signal !== 'SIGINT') {
Expand Down
6 changes: 3 additions & 3 deletions test/sequential/test-cpu-prof-name.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const {
getCpuProfiles,
kCpuProfInterval,
env,
verifyFrames
verifyFrames,
} = require('../common/cpu-prof');

// --cpu-prof-name
Expand All @@ -33,7 +33,7 @@ const {
fixtures.path('workload', 'fibonacci.js'),
], {
cwd: tmpdir.path,
env
env,
});
if (output.status !== 0) {
console.log(output.stderr.toString());
Expand All @@ -60,7 +60,7 @@ const {
fixtures.path('workload', 'fibonacci.js'),
], {
cwd: dir,
env
env,
});

if (output.status !== 0) {
Expand Down
6 changes: 3 additions & 3 deletions test/sequential/test-cpu-prof-worker-argv.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const tmpdir = require('../common/tmpdir');
const {
getCpuProfiles,
kCpuProfInterval,
verifyFrames
verifyFrames,
} = require('../common/cpu-prof');

{
Expand All @@ -25,8 +25,8 @@ const {
cwd: tmpdir.path,
env: {
...process.env,
CPU_PROF_INTERVAL: kCpuProfInterval
}
CPU_PROF_INTERVAL: kCpuProfInterval,
},
});
if (output.status !== 0) {
console.log(output.stderr.toString());
Expand Down
8 changes: 4 additions & 4 deletions test/sequential/test-crypto-timing-safe-equal.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,20 +51,20 @@ assert.strictEqual(
test(new Float32Array([NaN]), new Float32Array([NaN]), {
equal: false,
sameValue: true,
timingSafeEqual: true
timingSafeEqual: true,
});

test(new Float64Array([0]), new Float64Array([-0]), {
equal: true,
sameValue: false,
timingSafeEqual: false
timingSafeEqual: false,
});

const x = new BigInt64Array([0x7ff0000000000001n, 0xfff0000000000001n]);
test(new Float64Array(x.buffer), new Float64Array([NaN, NaN]), {
equal: false,
sameValue: true,
timingSafeEqual: false
timingSafeEqual: false,
});
}

Expand All @@ -73,7 +73,7 @@ assert.throws(
{
code: 'ERR_CRYPTO_TIMING_SAFE_EQUAL_LENGTH',
name: 'RangeError',
message: 'Input buffers must have the same byte length'
message: 'Input buffers must have the same byte length',
}
);

Expand Down
6 changes: 3 additions & 3 deletions test/sequential/test-diagnostic-dir-cpu-prof.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const {
getCpuProfiles,
kCpuProfInterval,
env,
verifyFrames
verifyFrames,
} = require('../common/cpu-prof');

// Test --diagnostic-dir changes the default for --cpu-prof
Expand All @@ -33,7 +33,7 @@ const {
fixtures.path('workload', 'fibonacci.js'),
], {
cwd: tmpdir.path,
env
env,
});
if (output.status !== 0) {
console.log(output.stderr.toString());
Expand Down Expand Up @@ -62,7 +62,7 @@ const {
fixtures.path('workload', 'fibonacci.js'),
], {
cwd: tmpdir.path,
env
env,
});
if (output.status !== 0) {
console.log(output.stderr.toString());
Expand Down
6 changes: 3 additions & 3 deletions test/sequential/test-diagnostic-dir-heap-prof.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ const TEST_ALLOCATION = kHeapProfInterval * 2;
const env = {
...process.env,
TEST_ALLOCATION,
NODE_DEBUG_NATIVE: 'INSPECTOR_PROFILER'
NODE_DEBUG_NATIVE: 'INSPECTOR_PROFILER',
};

function getHeapProfiles(dir) {
Expand All @@ -76,7 +76,7 @@ function getHeapProfiles(dir) {
fixtures.path('workload', 'allocation.js'),
], {
cwd: tmpdir.path,
env
env,
});
if (output.status !== 0) {
console.log(output.stderr.toString());
Expand Down Expand Up @@ -104,7 +104,7 @@ function getHeapProfiles(dir) {
fixtures.path('workload', 'allocation.js'),
], {
cwd: tmpdir.path,
env
env,
});
if (output.status !== 0) {
console.log(output.stderr.toString());
Expand Down
2 changes: 1 addition & 1 deletion test/sequential/test-error-serdes.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ const data = {
foo: 'bar',
[inspect.custom]() {
return 'barbaz';
}
},
};
assert.strictEqual(inspect(cycle(data)), 'barbaz');

Expand Down
2 changes: 1 addition & 1 deletion test/sequential/test-gc-http-client-onerror.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ function getAll(requestsRemaining) {
const req = http.get({
hostname: 'localhost',
pathname: '/',
port: server.address().port
port: server.address().port,
}, cb).on('error', onerror);

count++;
Expand Down
Loading
Loading