refactor: hard-fork GSD -> MSD (Make Software Done)
Mechanical rename produced by scripts/msd-rename.cjs: gsd/Gsd/GSD -> msd/Msd/MSD across contents and paths, upstream package/repo coordinates -> @golem15/msd-core and golem15com/msd-core. Deep links into upstream history, sibling upstream packages, the GSD-2 import feature, CHANGELOG.md and .changeset/ are kept as-is. Hand edits on top: MSD block-letter banner and logos, LICENSE copyright line, package/plugin identity, regenerated lockfile, install-tree fixtures, derived registries and benchmark baseline; migration checksum baseline re-locked (MSD keeps its own install state, so no install had applied the old sums); sort-order and regex-escaped expectations in tests adjusted.
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* Unit tests for `gsd-tools phase tdd-applicable` (#4273, Phase 1 of epic #4272).
|
||||
* Unit tests for `msd-tools phase tdd-applicable` (#4273, Phase 1 of epic #4272).
|
||||
*
|
||||
* Matrix rows referenced below are from
|
||||
* .gsd/phase/feat-4273-tdd-applicable-query-verb/50-test-matrix.md
|
||||
* .msd/phase/feat-4273-tdd-applicable-query-verb/50-test-matrix.md
|
||||
*/
|
||||
|
||||
const path = require('node:path');
|
||||
@@ -12,7 +12,7 @@ const fs = require('node:fs');
|
||||
const { describe, test } = require('node:test');
|
||||
const assert = require('node:assert/strict');
|
||||
|
||||
const { createTempProject, cleanup, runGsdTools } = require('./helpers.cjs');
|
||||
const { createTempProject, cleanup, runMsdTools } = require('./helpers.cjs');
|
||||
|
||||
function writePlan(dir, relPath, content) {
|
||||
const full = path.join(dir, relPath);
|
||||
@@ -30,7 +30,7 @@ type: standard
|
||||
---
|
||||
<task type="auto"><name>a</name></task>
|
||||
`);
|
||||
const result = runGsdTools(['query', 'phase.tdd-applicable', planPath, '--cli-flag'], tmpDir);
|
||||
const result = runMsdTools(['query', 'phase.tdd-applicable', planPath, '--cli-flag'], tmpDir);
|
||||
assert.equal(result.success, true, result.error);
|
||||
const parsed = JSON.parse(result.output);
|
||||
assert.equal(parsed.applicable, true);
|
||||
@@ -45,7 +45,7 @@ type: tdd
|
||||
---
|
||||
<task type="auto"><name>a</name></task>
|
||||
`);
|
||||
const result = runGsdTools(['query', 'phase.tdd-applicable', planPath], tmpDir);
|
||||
const result = runMsdTools(['query', 'phase.tdd-applicable', planPath], tmpDir);
|
||||
assert.equal(result.success, true, result.error);
|
||||
const parsed = JSON.parse(result.output);
|
||||
assert.equal(parsed.applicable, true);
|
||||
@@ -61,7 +61,7 @@ type: standard
|
||||
<task type="auto"><name>a</name></task>
|
||||
<task type="auto" tdd="true"><name>b</name></task>
|
||||
`);
|
||||
const result = runGsdTools(['query', 'phase.tdd-applicable', planPath], tmpDir);
|
||||
const result = runMsdTools(['query', 'phase.tdd-applicable', planPath], tmpDir);
|
||||
assert.equal(result.success, true, result.error);
|
||||
const parsed = JSON.parse(result.output);
|
||||
assert.equal(parsed.applicable, true);
|
||||
@@ -74,7 +74,7 @@ type: standard
|
||||
const planPath = writePlan(tmpDir, '.planning/phases/01-x/01-PLAN.md', `<task type="auto"><name>a</name></task>\n`);
|
||||
const configPath = path.join(tmpDir, '.planning', 'config.json');
|
||||
fs.writeFileSync(configPath, JSON.stringify({ workflow: { tdd_mode: true } }), 'utf8');
|
||||
const result = runGsdTools(['query', 'phase.tdd-applicable', planPath], tmpDir);
|
||||
const result = runMsdTools(['query', 'phase.tdd-applicable', planPath], tmpDir);
|
||||
assert.equal(result.success, true, result.error);
|
||||
const parsed = JSON.parse(result.output);
|
||||
assert.equal(parsed.applicable, true);
|
||||
@@ -85,7 +85,7 @@ type: standard
|
||||
const tmpDir = createTempProject();
|
||||
t.after(() => cleanup(tmpDir));
|
||||
const planPath = writePlan(tmpDir, '.planning/phases/01-x/01-PLAN.md', `<task type="auto"><name>a</name></task>\n`);
|
||||
const result = runGsdTools(['query', 'phase.tdd-applicable', planPath], tmpDir);
|
||||
const result = runMsdTools(['query', 'phase.tdd-applicable', planPath], tmpDir);
|
||||
assert.equal(result.success, true, result.error);
|
||||
const parsed = JSON.parse(result.output);
|
||||
assert.equal(parsed.applicable, false);
|
||||
@@ -96,14 +96,14 @@ type: standard
|
||||
const tmpDir = createTempProject();
|
||||
t.after(() => cleanup(tmpDir));
|
||||
const missingPath = path.join(tmpDir, '.planning', 'phases', '01-x', 'does-not-exist-PLAN.md');
|
||||
const result = runGsdTools(['query', 'phase.tdd-applicable', missingPath], tmpDir);
|
||||
const result = runMsdTools(['query', 'phase.tdd-applicable', missingPath], tmpDir);
|
||||
assert.equal(result.success, false);
|
||||
});
|
||||
|
||||
test('row 15 — missing plan-id argument: USAGE error, non-zero exit', (t) => {
|
||||
const tmpDir = createTempProject();
|
||||
t.after(() => cleanup(tmpDir));
|
||||
const result = runGsdTools(['query', 'phase.tdd-applicable'], tmpDir);
|
||||
const result = runMsdTools(['query', 'phase.tdd-applicable'], tmpDir);
|
||||
assert.equal(result.success, false);
|
||||
});
|
||||
|
||||
@@ -115,7 +115,7 @@ type: standard
|
||||
---
|
||||
<task type="auto"><name>a</name></task>
|
||||
`);
|
||||
const result = runGsdTools(['query', 'phase.tdd-applicable', planPath, '--cli-flag'], tmpDir);
|
||||
const result = runMsdTools(['query', 'phase.tdd-applicable', planPath, '--cli-flag'], tmpDir);
|
||||
const parsed = JSON.parse(result.output);
|
||||
assert.equal(parsed.source, 'cli_flag');
|
||||
});
|
||||
@@ -128,7 +128,7 @@ type: tdd
|
||||
---
|
||||
<task type="auto"><name>a</name></task>
|
||||
`);
|
||||
const result = runGsdTools(['query', 'phase.tdd-applicable', planPath], tmpDir);
|
||||
const result = runMsdTools(['query', 'phase.tdd-applicable', planPath], tmpDir);
|
||||
const parsed = JSON.parse(result.output);
|
||||
assert.equal(parsed.source, 'plan_frontmatter');
|
||||
});
|
||||
@@ -137,7 +137,7 @@ type: tdd
|
||||
const tmpDir = createTempProject();
|
||||
t.after(() => cleanup(tmpDir));
|
||||
const planPath = writePlan(tmpDir, '.planning/phases/01-x/01-PLAN.md', `<task type="auto"><name>a</name></task>\n`);
|
||||
const result = runGsdTools(['query', 'phase.tdd-applicable', planPath], tmpDir);
|
||||
const result = runMsdTools(['query', 'phase.tdd-applicable', planPath], tmpDir);
|
||||
assert.equal(result.success, true, result.error);
|
||||
const parsed = JSON.parse(result.output);
|
||||
assert.ok('applicable' in parsed);
|
||||
@@ -151,7 +151,7 @@ type: tdd
|
||||
const tmpDir = createTempProject();
|
||||
t.after(() => cleanup(tmpDir));
|
||||
const planPath = writePlan(tmpDir, '.planning/phases/01-x/01-PLAN.md', '');
|
||||
const result = runGsdTools(['query', 'phase.tdd-applicable', planPath], tmpDir);
|
||||
const result = runMsdTools(['query', 'phase.tdd-applicable', planPath], tmpDir);
|
||||
assert.equal(result.success, true, result.error);
|
||||
const parsed = JSON.parse(result.output);
|
||||
assert.equal(parsed.applicable, false);
|
||||
|
||||
Reference in New Issue
Block a user