@activate-core/test-forge 2.3.1 → 2.4.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.
- package/README.md +60 -17
- package/dist/cli/index.js +12 -2
- package/dist/core/docs/discover.js +62 -40
- package/dist/core/docs/doc-check.js +257 -0
- package/dist/core/docs/doc-guidance.js +3 -176
- package/dist/core/docs/grounding.js +37 -58
- package/dist/core/docs/reference-text.js +24 -6
- package/dist/core/docs/reference.js +23 -41
- package/dist/core/docs/review.js +17 -40
- package/dist/core/gates/validate.js +78 -0
- package/dist/core/generate/ai-generator.js +138 -87
- package/dist/core/generate/ai-usage.js +9 -1
- package/dist/core/generate/defect-review.js +69 -66
- package/dist/core/generate/doc-diff.js +25 -1
- package/dist/core/generate/harness.js +184 -210
- package/dist/core/generate/journey-memory.js +39 -3
- package/dist/core/generate/run-generate.js +9 -8
- package/dist/core/generate/seed-generator.js +56 -65
- package/dist/core/generate/update-journey.js +3 -1
- package/dist/core/project/init.js +98 -0
- package/dist/core/project/setup.js +15 -20
- package/dist/core/prompts/blocks.js +340 -0
- package/dist/core/run/name-scan.js +14 -6
- package/dist/core/run/run-tests.js +21 -1
- package/package.json +1 -1
- package/reporters/_shared.cjs +32 -1
- package/reporters/jest-reporter.cjs +7 -6
- package/reporters/playwright-reporter.cjs +5 -5
|
@@ -18,85 +18,76 @@ import { readFileSync, existsSync } from 'node:fs';
|
|
|
18
18
|
import { loadConfig, splitCommand, withNoTools, withReadOnlyTools } from '../project/config.js';
|
|
19
19
|
import { cleanOutput } from './ai-generator.js';
|
|
20
20
|
import { runAiSync } from './ai-usage.js';
|
|
21
|
+
import { dataLayer } from './harness.js';
|
|
21
22
|
const MAP_PATH = 'testforge.md';
|
|
22
|
-
/** Build the seed-generation prompt for one journey. */
|
|
23
|
-
export function buildSeedPrompt(journeyDoc, seedPath) {
|
|
24
|
-
const map = existsSync(MAP_PATH) ? readFileSync(MAP_PATH, 'utf-8') : '';
|
|
23
|
+
/** Build the seed-generation prompt for one journey. With code facts the call has no tools. */
|
|
24
|
+
export function buildSeedPrompt(journeyDoc, seedPath, facts) {
|
|
25
|
+
const map = dataLayer(existsSync(MAP_PATH) ? readFileSync(MAP_PATH, 'utf-8') : '');
|
|
25
26
|
const ext = loadConfig().testExtension ?? '.test.ts';
|
|
26
|
-
const isJs = ext
|
|
27
|
-
const language = isJs
|
|
28
|
-
? 'plain JavaScript (CommonJS: use require/module.exports, NO TypeScript type annotations)'
|
|
29
|
-
: 'TypeScript';
|
|
27
|
+
const isJs = /\.[cm]?js$/.test(seedPath ?? ext);
|
|
30
28
|
return [
|
|
31
|
-
`You are a senior SDET writing a
|
|
32
|
-
`
|
|
29
|
+
`You are a senior SDET writing a test data seed for one journey, so its tests`,
|
|
30
|
+
`start from a known, valid state.`,
|
|
33
31
|
``,
|
|
34
|
-
|
|
35
|
-
`running inside the repository with read-only tools (Read, Grep, Glob,`,
|
|
36
|
-
`LS): READ THE ACTUAL MODEL/SCHEMA FILES for the collections this`,
|
|
37
|
-
`feature uses (grep for the model names) and build records that are`,
|
|
38
|
-
`VALID against the real schema — right collection/table, right field`,
|
|
39
|
-
`names and types, real required fields, real enum values, and correct`,
|
|
40
|
-
`relationships between records. Do not guess a field that a quick read`,
|
|
41
|
-
`of the model would confirm. Do NOT write or edit any file; output only`,
|
|
42
|
-
`the seed code to stdout.`,
|
|
43
|
-
``,
|
|
44
|
-
`Requirements for the seed you write:`,
|
|
45
|
-
`- Connect using the env var(s) named in the map. If the app spans`,
|
|
46
|
-
` MULTIPLE databases (e.g. main + chat/conversation + identity/IM),`,
|
|
47
|
-
` connect to and seed EACH into the DB it belongs to — do not assume a`,
|
|
48
|
-
` single process.env.DB_URL. NEVER hardcode a connection string or secret.`,
|
|
49
|
-
`- Make it IDEMPOTENT with an explicit field split: upsert by a stable`,
|
|
50
|
-
` id using { $set: <mutable fields>, $setOnInsert: { createdAt, ...other`,
|
|
51
|
-
` creation-only fields } } (updateOne/findOneAndUpdate, upsert:true). Do`,
|
|
52
|
-
` NOT use replaceOne, and do NOT put createdAt/creation metadata in $set`,
|
|
53
|
-
` — that clobbers it on every re-run. Seed shared/base entities (e.g. an`,
|
|
54
|
-
` identity user) INSERT-ONLY ($setOnInsert only) so a developer's richer`,
|
|
55
|
-
` local record is never overwritten.`,
|
|
56
|
-
`- Every well-known id MUST be env-overridable: read`,
|
|
57
|
-
` process.env.TEST_<NAME>_ID (falling back to a stable default), using`,
|
|
58
|
-
` the SAME names the testkit's TEST_IDS exposes. This lets the same`,
|
|
59
|
-
` fixtures target data created BY HAND on staging/prod without code`,
|
|
60
|
-
` edits (used with SEED_MODE=existing, where writes are skipped).`,
|
|
61
|
-
`- Prefix test data clearly (e.g. names/ids starting with "qa-" or`,
|
|
62
|
-
` "QA-TEST") so it is obvious and easy to clean up.`,
|
|
63
|
-
`- Insert only what THIS feature's tests need as a precondition,`,
|
|
64
|
-
` honoring relationships (e.g. if an order references a user, seed`,
|
|
65
|
-
` the user too).`,
|
|
66
|
-
`- Use the database driver/ORM the project already uses (infer from`,
|
|
67
|
-
` the map / schema style).`,
|
|
68
|
-
``,
|
|
69
|
-
...(seedPath
|
|
32
|
+
...(facts
|
|
70
33
|
? [
|
|
71
|
-
`
|
|
72
|
-
`
|
|
73
|
-
`Compute every require()/import path (to app source, models, config,`,
|
|
74
|
-
`etc.) RELATIVE TO THAT EXACT location — count the directory depth`,
|
|
75
|
-
`from that path, do not assume a conventional depth. A wrong`,
|
|
76
|
-
`relative depth makes the seed fail to load.`,
|
|
77
|
-
``,
|
|
34
|
+
`You have no tools. Use only <code_facts> and <project_map_data_layer>. A table`,
|
|
35
|
+
`or column they do not show is not seeded.`,
|
|
78
36
|
]
|
|
79
|
-
: [
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
`
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
37
|
+
: [
|
|
38
|
+
`You are inside the repository with read-only tools (Read, Grep, Glob, LS).`,
|
|
39
|
+
`Read the model or schema file for every table or collection you seed.`,
|
|
40
|
+
]),
|
|
41
|
+
``,
|
|
42
|
+
`Requirements`,
|
|
43
|
+
`- Records are valid against the real schema: the right table or collection,`,
|
|
44
|
+
` field names and types, every required field (NOT NULL with no default),`,
|
|
45
|
+
` real enum values, correct id types, and the related records they need`,
|
|
46
|
+
` (seed the user an order references).`,
|
|
47
|
+
`- Seed only what this journey's tests need as a precondition.`,
|
|
48
|
+
`- Connect with the env var names in the map. If there are several stores,`,
|
|
49
|
+
` seed each record into its own store. Never write a connection string or a`,
|
|
50
|
+
` secret.`,
|
|
51
|
+
`- Use the driver or ORM the project already uses.`,
|
|
52
|
+
`- Idempotent: upsert by a stable id. Update mutable fields on every run, and`,
|
|
53
|
+
` write creation-only fields (createdAt and similar) only on insert. Shared`,
|
|
54
|
+
` base entities (such as an identity user) are insert-only, so a developer's`,
|
|
55
|
+
` richer local record is never overwritten. Use the database's own upsert:`,
|
|
56
|
+
` in MongoDB, $set plus $setOnInsert with upsert; in MySQL, INSERT …`,
|
|
57
|
+
` ON DUPLICATE KEY UPDATE (or INSERT IGNORE for insert-only); in PostgreSQL`,
|
|
58
|
+
` and SQLite, INSERT … ON CONFLICT DO UPDATE or DO NOTHING; in an ORM, its`,
|
|
59
|
+
` upsert with the same split.`,
|
|
60
|
+
`- Ids are env-overridable, with the same names as the testkit's TEST_IDS:`,
|
|
61
|
+
` process.env.TEST_<NAME>_ID || '<stable default>'. With SEED_MODE=existing,`,
|
|
62
|
+
` skip all writes.`,
|
|
63
|
+
`- Prefix test data clearly ("qa-" or "QA-TEST") so it is easy to find and`,
|
|
64
|
+
` clean up.`,
|
|
65
|
+
`- Never invent a field or a value. Leave out anything you could not confirm,`,
|
|
66
|
+
` and list it in the top comment under "Not seeded:" with the reason.`,
|
|
88
67
|
``,
|
|
89
|
-
|
|
68
|
+
...(seedPath ? [`The file will be saved at exactly ${seedPath}; compute every`, `require or import path relative to it.`] : []),
|
|
69
|
+
`Language: ${isJs ? 'JavaScript (CommonJS, no type annotations)' : 'TypeScript'}.`,
|
|
70
|
+
`Output only the code, with no fences. Start with a comment block saying what`,
|
|
71
|
+
`it seeds, plus "Not seeded:" if anything was left out. Never write TODO.`,
|
|
72
|
+
``,
|
|
73
|
+
`<project_map_data_layer>`,
|
|
74
|
+
map,
|
|
75
|
+
`</project_map_data_layer>`,
|
|
76
|
+
`<journey_doc>`,
|
|
90
77
|
journeyDoc,
|
|
78
|
+
`</journey_doc>`,
|
|
79
|
+
...(facts ? [`<code_facts>`, facts, `</code_facts>`] : []),
|
|
91
80
|
].join('\n');
|
|
92
81
|
}
|
|
82
|
+
/** A seed may not leave notes to finish later: what it could not confirm is listed under "Not seeded:". */
|
|
83
|
+
export function seedProblem(code) {
|
|
84
|
+
return /\b(TODO|FIXME)\b/.test(code) ? 'the seed has a TODO/FIXME: leave out what you could not confirm and list it under "Not seeded:" in the top comment' : null;
|
|
85
|
+
}
|
|
93
86
|
/** Generate a seed file's content for one journey doc, via the AI. */
|
|
94
87
|
export function generateSeed(journeyDoc, seedPath, facts) {
|
|
95
88
|
// With the journey's code facts in hand the seed is one call with no tools;
|
|
96
89
|
// without them it may read the schema itself (read-only).
|
|
97
|
-
const prompt = facts
|
|
98
|
-
? `${buildSeedPrompt(journeyDoc, seedPath)}\n\n--- CODE FACTS (the schema, models and routes read from this project) ---\n${facts}\nYou have no tools: use only these facts and the map above. A table or column they do not show is left out of the seed.`
|
|
99
|
-
: buildSeedPrompt(journeyDoc, seedPath);
|
|
90
|
+
const prompt = buildSeedPrompt(journeyDoc, seedPath, facts);
|
|
100
91
|
const cmd = splitCommand(loadConfig().aiCommand);
|
|
101
92
|
const { program, args } = facts ? withNoTools(cmd) : withReadOnlyTools(cmd);
|
|
102
93
|
const output = runAiSync(program, args, {
|
|
@@ -73,13 +73,14 @@ export async function updateJourney(ctx) {
|
|
|
73
73
|
const oldText = old.map((b) => content.slice(b.start, b.end)).join('\n\n');
|
|
74
74
|
const base = old.length ? spliceBlocks(content, old.map((block) => ({ block, text: '' }))) : content;
|
|
75
75
|
let refusal;
|
|
76
|
+
let refused = '';
|
|
76
77
|
let next = null;
|
|
77
78
|
// Only the new tests are judged: a problem the file already had is not theirs.
|
|
78
79
|
const already = ctx.check(base, path);
|
|
79
80
|
for (let attempt = 0; attempt < 2 && next === null; attempt++) {
|
|
80
81
|
let tests = '';
|
|
81
82
|
try {
|
|
82
|
-
tests = await writeTestsWithAI(ctx.journey, path, head, title, oldText, ctx.harnessPath, ctx.transport, factsSlice(ctx.facts, slice.controls), mem, refusal);
|
|
83
|
+
tests = await writeTestsWithAI(ctx.journey, path, head, title, oldText, ctx.harnessPath, ctx.transport, factsSlice(ctx.facts, slice.controls), mem, refusal ? { reason: refusal, previous: refused } : undefined);
|
|
83
84
|
}
|
|
84
85
|
catch (e) {
|
|
85
86
|
refusal = undefined;
|
|
@@ -89,6 +90,7 @@ export async function updateJourney(ctx) {
|
|
|
89
90
|
const candidate = appendTests(base, tests);
|
|
90
91
|
const why = findTestBlocks(tests).length ? ctx.check(candidate, path) : 'it contained no test(...) block';
|
|
91
92
|
refusal = why && why !== already ? why : undefined;
|
|
93
|
+
refused = tests;
|
|
92
94
|
if (!refusal)
|
|
93
95
|
next = candidate;
|
|
94
96
|
}
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
* Nothing is hardcoded for a specific framework or layout; the AI
|
|
11
11
|
* infers it from what the project actually looks like.
|
|
12
12
|
*/
|
|
13
|
+
import { readFileSync, writeFileSync } from 'node:fs';
|
|
13
14
|
import { loadConfig, splitCommand, withEditTools } from './config.js';
|
|
14
15
|
import { runAiSync } from '../generate/ai-usage.js';
|
|
15
16
|
/** Build the prompt that asks the AI to write testforge.config.json. */
|
|
@@ -78,3 +79,100 @@ export function runInit() {
|
|
|
78
79
|
});
|
|
79
80
|
return output.trim();
|
|
80
81
|
}
|
|
82
|
+
/** The keys setup writes, and nothing else. */
|
|
83
|
+
const SETUP_KEYS = ['aiCommand', 'project', 'dashboardUrl', 'testExtension', 'testOutput', 'framework', 'seedOutput'];
|
|
84
|
+
/**
|
|
85
|
+
* One call that writes both testforge.config.json and the project map
|
|
86
|
+
* (testforge.md). `init` and `map` stay as commands of their own; `map` is
|
|
87
|
+
* also what `update` re-runs when the code changes.
|
|
88
|
+
*/
|
|
89
|
+
export function buildSetupPrompt(relatedDirs = []) {
|
|
90
|
+
return [
|
|
91
|
+
`You are setting up TestForge in this repository. You have read-only tools, and`,
|
|
92
|
+
`permission to write two files at the project root: testforge.config.json and`,
|
|
93
|
+
`testforge.md. Base everything on what you read, and invent nothing.`,
|
|
94
|
+
``,
|
|
95
|
+
...(relatedDirs.length
|
|
96
|
+
? [
|
|
97
|
+
`Related repositories you may read but not change: ${relatedDirs.map((d) => `"${d}"`).join(', ')}. Journeys`,
|
|
98
|
+
`come only from this repository. When the data layer, or an API this project`,
|
|
99
|
+
`calls, lives in a related repo, map it from there and name that repo.`,
|
|
100
|
+
``,
|
|
101
|
+
]
|
|
102
|
+
: []),
|
|
103
|
+
`1. testforge.config.json: valid JSON with exactly these keys.`,
|
|
104
|
+
`{`,
|
|
105
|
+
` "aiCommand": "claude -p --model sonnet",`,
|
|
106
|
+
` "project": "<kebab-case repo slug>",`,
|
|
107
|
+
` "dashboardUrl": "",`,
|
|
108
|
+
` "testExtension": ".test.ts or .test.js",`,
|
|
109
|
+
` "testOutput": { "<area>": "<folder>" },`,
|
|
110
|
+
` "framework": { "<area>": "jest or playwright" },`,
|
|
111
|
+
` "seedOutput": "<folder>"`,
|
|
112
|
+
`}`,
|
|
113
|
+
`- Areas are whatever this project has (api, web, worker, lambda …).`,
|
|
114
|
+
`- testOutput: where each area's tests belong, matching existing test folders`,
|
|
115
|
+
` where they exist. A UI area uses a plain tests folder, never a Cypress`,
|
|
116
|
+
` folder.`,
|
|
117
|
+
`- framework: "jest" for backend, API, serverless and worker areas, and`,
|
|
118
|
+
` "playwright" for UI, web and admin areas. Use one of these two even if the`,
|
|
119
|
+
` project uses another runner today.`,
|
|
120
|
+
`- testExtension: match existing tests; otherwise follow the project's`,
|
|
121
|
+
` language.`,
|
|
122
|
+
`- seedOutput: the folder for seed files, next to the area's tests.`,
|
|
123
|
+
`- Keep aiCommand unless there is a clear reason to change it. Leave`,
|
|
124
|
+
` dashboardUrl empty: the developer sets it when the project is connected.`,
|
|
125
|
+
``,
|
|
126
|
+
`2. testforge.md: a short map in this shape.`,
|
|
127
|
+
`# Project Map`,
|
|
128
|
+
`## Journeys`,
|
|
129
|
+
`### <area>`,
|
|
130
|
+
`- <journey> — <one-line description>`,
|
|
131
|
+
`## Data Layer`,
|
|
132
|
+
`- Database: <type>, connection from env var <NAME> (one line per store,`,
|
|
133
|
+
` or "No database detected")`,
|
|
134
|
+
`- <model or table>: <key fields>; <enum values>; <relations>`,
|
|
135
|
+
` (name the source repo if it is not this one)`,
|
|
136
|
+
`Each journey takes one line. For the data layer, give enough to build a valid`,
|
|
137
|
+
`record (table, key fields, enum values, relations), not full schemas. Write`,
|
|
138
|
+
`env var names only, never connection strings or secrets.`,
|
|
139
|
+
``,
|
|
140
|
+
`3. Then print a short summary of your choices and why, so the developer can`,
|
|
141
|
+
`confirm them.`,
|
|
142
|
+
].join('\n');
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* Hold the written config to the closed key list: an unknown key is dropped,
|
|
146
|
+
* and a framework that is neither jest nor playwright is refused. Returns what
|
|
147
|
+
* was wrong; the file is rewritten without the unknown keys.
|
|
148
|
+
*/
|
|
149
|
+
export function checkSetupConfig(path = 'testforge.config.json') {
|
|
150
|
+
const problems = [];
|
|
151
|
+
let cfg;
|
|
152
|
+
try {
|
|
153
|
+
cfg = JSON.parse(readFileSync(path, 'utf-8'));
|
|
154
|
+
}
|
|
155
|
+
catch (e) {
|
|
156
|
+
return [`${path} is not valid JSON: ${e.message}`];
|
|
157
|
+
}
|
|
158
|
+
const unknown = Object.keys(cfg).filter((k) => !SETUP_KEYS.includes(k));
|
|
159
|
+
for (const k of unknown)
|
|
160
|
+
delete cfg[k];
|
|
161
|
+
if (unknown.length)
|
|
162
|
+
problems.push(`dropped unknown key(s): ${unknown.join(', ')}`);
|
|
163
|
+
for (const [area, fw] of Object.entries((cfg.framework ?? {}))) {
|
|
164
|
+
if (fw !== 'jest' && fw !== 'playwright')
|
|
165
|
+
problems.push(`framework.${area} is "${String(fw)}": it must be "jest" or "playwright"`);
|
|
166
|
+
}
|
|
167
|
+
for (const k of ['project', 'testOutput', 'framework'])
|
|
168
|
+
if (cfg[k] === undefined)
|
|
169
|
+
problems.push(`"${k}" is missing`);
|
|
170
|
+
if (unknown.length)
|
|
171
|
+
writeFileSync(path, `${JSON.stringify(cfg, null, 2)}\n`, 'utf-8');
|
|
172
|
+
return problems;
|
|
173
|
+
}
|
|
174
|
+
/** Run setup's one call: config and map together. */
|
|
175
|
+
export function runSetupCall(relatedDirs = []) {
|
|
176
|
+
const { program, args } = withEditTools(splitCommand(loadConfig().aiCommand), relatedDirs);
|
|
177
|
+
return runAiSync(program, args, { input: buildSetupPrompt(relatedDirs), encoding: 'utf-8', maxBuffer: 10 * 1024 * 1024 }).trim();
|
|
178
|
+
}
|
|
@@ -3,9 +3,8 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Runs the one-time project preparation in order, with progress so the
|
|
5
5
|
* user can see what is happening at each stage:
|
|
6
|
-
* 1.
|
|
7
|
-
* 2.
|
|
8
|
-
* 3. discover — draft a doc per journey into docs/
|
|
6
|
+
* 1. config + map — one call writes testforge.config.json and testforge.md
|
|
7
|
+
* 2. discover — draft a doc per journey into docs/
|
|
9
8
|
*
|
|
10
9
|
* Each step is also available as its own command for re-running a
|
|
11
10
|
* single stage; setup just chains them for a smooth first run.
|
|
@@ -13,8 +12,8 @@
|
|
|
13
12
|
import { existsSync } from 'node:fs';
|
|
14
13
|
import { hashProjectSource, loadCache, saveCache } from '../docs/cache.js';
|
|
15
14
|
import { CACHE_PATH } from '../paths.js';
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
15
|
+
import { checkSetupConfig, runSetupCall } from './init.js';
|
|
16
|
+
import { loadConfig } from './config.js';
|
|
18
17
|
import { runDiscover } from '../docs/discover.js';
|
|
19
18
|
import { runEnvTemplate } from './env-template.js';
|
|
20
19
|
export async function runSetup(srcDir, opts = {}) {
|
|
@@ -32,27 +31,20 @@ export async function runSetup(srcDir, opts = {}) {
|
|
|
32
31
|
return;
|
|
33
32
|
}
|
|
34
33
|
console.log('Setting up testforge for this project.\n');
|
|
35
|
-
//
|
|
36
|
-
console.log('Step 1/
|
|
37
|
-
|
|
34
|
+
// Steps 1 and 2 — config and map, in one call.
|
|
35
|
+
console.log('Step 1/2: Inspecting the project, writing the config and the project map...');
|
|
36
|
+
runSetupCall(loadConfig().relatedDirs ?? []);
|
|
38
37
|
if (existsSync('testforge.config.json')) {
|
|
39
|
-
|
|
38
|
+
const problems = checkSetupConfig();
|
|
39
|
+
console.log(problems.length ? ` testforge.config.json written, with problems to fix:\n ${problems.join('\n ')}\n` : ' done — testforge.config.json');
|
|
40
40
|
}
|
|
41
41
|
else {
|
|
42
|
-
console.log(' warning: testforge.config.json was not created
|
|
43
|
-
}
|
|
44
|
-
// Step 2 — map.
|
|
45
|
-
console.log('Step 2/3: Mapping journeys and the data layer...');
|
|
46
|
-
runMap(srcDir);
|
|
47
|
-
if (existsSync('testforge.md')) {
|
|
48
|
-
console.log(' done — testforge.md\n');
|
|
49
|
-
}
|
|
50
|
-
else {
|
|
51
|
-
console.log(' warning: testforge.md was not created\n');
|
|
42
|
+
console.log(' warning: testforge.config.json was not created');
|
|
52
43
|
}
|
|
44
|
+
console.log(existsSync('testforge.md') ? ' done — testforge.md\n' : ' warning: testforge.md was not created\n');
|
|
53
45
|
// Step 3 — discover. This is where the source-of-truth barrier lives:
|
|
54
46
|
// the docs may be based on testforge.md or on an external reference.
|
|
55
|
-
console.log('Step
|
|
47
|
+
console.log('Step 2/2: Drafting a doc for each journey...');
|
|
56
48
|
await runDiscover(srcDir, 'docs', opts);
|
|
57
49
|
console.log(' done — docs/\n');
|
|
58
50
|
// Remember the source state so the first `update` can detect "no change".
|
|
@@ -65,6 +57,9 @@ export async function runSetup(srcDir, opts = {}) {
|
|
|
65
57
|
runEnvTemplate('docs', '.env.testing.example', srcDir);
|
|
66
58
|
console.log('');
|
|
67
59
|
console.log('Setup complete.');
|
|
60
|
+
if (!loadConfig().dashboardUrl) {
|
|
61
|
+
console.log('To publish runs to the TestForge dashboard, set "dashboardUrl" in testforge.config.json and TESTFORGE_KEY in the env file.');
|
|
62
|
+
}
|
|
68
63
|
console.log('Review the drafts in docs/, fix anything the AI got wrong,');
|
|
69
64
|
console.log('then run `testforge generate` to create tests and seed files.');
|
|
70
65
|
}
|