@activate-core/test-forge 0.19.0 → 0.19.1

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.
@@ -65,9 +65,27 @@ export function runnerCommand(config, area, framework, root, rel, journey, targe
65
65
  }
66
66
  return `npx playwright test${cfgFlag} ${target}`;
67
67
  }
68
+ // Jest needs its config named for the same reason Playwright does: the one
69
+ // testforge writes sits beside the AREA's tests, not at the package root, so
70
+ // Jest's own discovery misses it — and with it the reporter that publishes
71
+ // the run. Walk up from the test directory and take the first config found.
72
+ let jestCfg = '';
73
+ for (let dir = rel;; dir = dirname(dir)) {
74
+ const hit = ['jest.config.js', 'jest.config.cjs', 'jest.config.ts']
75
+ .map((f) => (dir === '.' ? f : join(dir, f)))
76
+ .find((f) => existsSync(join(root, f)));
77
+ if (hit) {
78
+ jestCfg = ` --config=${hit}`;
79
+ break;
80
+ }
81
+ if (dir === '.' || dir === dirname(dir))
82
+ break;
83
+ }
68
84
  if (paths.length)
69
- return `npx jest ${paths.join(' ')}`;
70
- return journey ? `npx jest --testPathPattern "${journey}"` : `npx jest ${rel}`;
85
+ return `npx jest${jestCfg} ${paths.join(' ')}`;
86
+ return journey
87
+ ? `npx jest${jestCfg} --testPathPattern "${journey}"`
88
+ : `npx jest${jestCfg} ${rel}`;
71
89
  }
72
90
  export function runTests(opts = {}) {
73
91
  const config = loadConfig();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@activate-core/test-forge",
3
- "version": "0.19.0",
3
+ "version": "0.19.1",
4
4
  "description": "AI-powered QA automation. Scans a project, drafts journey docs, and generates seeded Jest/Playwright tests. Works in any project, with any AI CLI.",
5
5
  "type": "module",
6
6
  "bin": {