Skip to content
Closed
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
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
'use strict';

require('../common');
require('../../common');
const assert = require('node:assert/strict');
const childProcess = require('node:child_process');
const fixtures = require('../common/fixtures');
const fixtures = require('../../common/fixtures');

const child = childProcess.spawnSync(
process.execPath,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Missing script: "non-existent-command" for *
Missing script: "non-existent-command" for <project-root>/test/fixtures/run-script/package.json

Available scripts are:
test: echo "Error: no test specified" && exit 1
Expand All @@ -14,3 +14,4 @@ Available scripts are:
special-env-variables-windows: special-env-variables.bat
pwd: pwd
pwd-windows: cd

15 changes: 15 additions & 0 deletions test/parallel/test-node-output-run.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import '../common/index.mjs';
import * as fixtures from '../common/fixtures.mjs';
import * as snapshot from '../common/assertSnapshot.js';
import { describe, it } from 'node:test';

describe('node --run output', { concurrency: !process.env.TEST_PARALLEL }, () => {
const tests = [
{ name: 'run-script/node_run_non_existent.js' },
];
for (const { name } of tests) {
it(name, async () => {
await snapshot.spawnAndAssert(fixtures.path(name), snapshot.defaultTransform);
});
}
});
Loading