flake-monster 0.4.3 → 0.4.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/cli/commands/test.js +8 -3
package/package.json
CHANGED
package/src/cli/commands/test.js
CHANGED
|
@@ -48,6 +48,11 @@ export function registerTestCommand(program) {
|
|
|
48
48
|
? detectRunner(testCmd)
|
|
49
49
|
: options.runner;
|
|
50
50
|
|
|
51
|
+
// node:test needs --test-reporter json for machine-parseable output
|
|
52
|
+
const effectiveCmd = (runner === 'node-test' && !testCmd.includes('--test-reporter'))
|
|
53
|
+
? testCmd.replace(/node\s+--test/, 'node --test --test-reporter json')
|
|
54
|
+
: testCmd;
|
|
55
|
+
|
|
51
56
|
const profile = FlakeProfile.fromConfig(merged);
|
|
52
57
|
const registry = new AdapterRegistry();
|
|
53
58
|
registry.register(createJavaScriptAdapter());
|
|
@@ -68,7 +73,7 @@ export function registerTestCommand(program) {
|
|
|
68
73
|
|
|
69
74
|
reporter.log(`FlakeMonster test harness`);
|
|
70
75
|
reporter.log(` Runs: ${runs} | Mode: ${profile.mode} | Base seed: ${baseSeed}`);
|
|
71
|
-
reporter.log(` Command: ${
|
|
76
|
+
reporter.log(` Command: ${effectiveCmd}`);
|
|
72
77
|
reporter.log(` Patterns: ${globs.join(', ')}`);
|
|
73
78
|
if (runner) {
|
|
74
79
|
reporter.log(` Runner: ${runner}`);
|
|
@@ -117,7 +122,7 @@ export function registerTestCommand(program) {
|
|
|
117
122
|
|
|
118
123
|
let exitCode, stdout, stderr, durationMs;
|
|
119
124
|
try {
|
|
120
|
-
({ exitCode, stdout, stderr } = await execAsync(
|
|
125
|
+
({ exitCode, stdout, stderr } = await execAsync(effectiveCmd, projectRoot, {
|
|
121
126
|
onStdout: reporter.quiet ? undefined : (chunk) => sticky.writeAbove(chunk),
|
|
122
127
|
onStderr: reporter.quiet ? undefined : (chunk) => sticky.writeAboveStderr(chunk),
|
|
123
128
|
}));
|
|
@@ -178,7 +183,7 @@ export function registerTestCommand(program) {
|
|
|
178
183
|
|
|
179
184
|
let exitCode, stdout, stderr, durationMs;
|
|
180
185
|
try {
|
|
181
|
-
({ exitCode, stdout, stderr } = await workspace.execAsync(
|
|
186
|
+
({ exitCode, stdout, stderr } = await workspace.execAsync(effectiveCmd, {
|
|
182
187
|
onStdout: reporter.quiet ? undefined : (chunk) => sticky.writeAbove(chunk),
|
|
183
188
|
onStderr: reporter.quiet ? undefined : (chunk) => sticky.writeAboveStderr(chunk),
|
|
184
189
|
}));
|