flake-monster 0.4.4 → 0.4.5

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "flake-monster",
3
- "version": "0.4.4",
3
+ "version": "0.4.5",
4
4
  "description": "Source-to-source test hardener that injects async delays to surface flaky tests",
5
5
  "type": "module",
6
6
  "bin": {
@@ -44,14 +44,17 @@ export function registerTestCommand(program) {
44
44
  const jsonOutput = options.format === 'json';
45
45
 
46
46
  // Resolve which runner parser to use
47
- const runner = options.runner === 'auto'
47
+ let runner = options.runner === 'auto'
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;
51
+ // node:test default reporter (spec) outputs to stderr, not stdout.
52
+ // Force TAP reporter for machine-parseable output on stdout.
53
+ let effectiveCmd = testCmd;
54
+ if (runner === 'node-test' && !testCmd.includes('--test-reporter')) {
55
+ effectiveCmd = testCmd.replace(/node\s+--test/, 'node --test --test-reporter tap');
56
+ runner = 'tap';
57
+ }
55
58
 
56
59
  const profile = FlakeProfile.fromConfig(merged);
57
60
  const registry = new AdapterRegistry();