The convergence lint only scanned src/ + gsd-core/bin, so ~35 test files still imported core.cjs. Repoint all 33 behaviour importers to the leaf modules directly (same symbol->leaf map as the src migration; leaves are the objects core re-exported by reference), delete the now-meaningless shim-identity describe blocks in the 8 leaf tests, and delete tests/core.test.cjs (forwarded-behaviour coverage now lives at the leaves; resolveWorktreeRoot test relocated to worktree-safety in T0) and tests/lint-core-spine-imports.test.cjs (the lint is removed in T-final). Dropped the stale core.test.cjs entries from the allow-test-rule-refs allowlist; eslint-rules RuleTester fixture path pointed at io.cjs. After T6: ZERO test imports core.cjs. core.cts still builds (now fully unused); T-final deletes it. No behaviour change. Closes #1291 Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -30,50 +30,8 @@ const path = require('node:path');
|
||||
const os = require('node:os');
|
||||
|
||||
const coreUtils = require('../gsd-core/bin/lib/core-utils.cjs');
|
||||
const core = require('../gsd-core/bin/lib/core.cjs');
|
||||
const { cleanup } = require('./helpers.cjs');
|
||||
|
||||
// ─── Shim-identity assertions ─────────────────────────────────────────────────
|
||||
|
||||
describe('core-utils: shim-identity — core.cjs re-exports same function objects', () => {
|
||||
test('core.toPosixPath === coreUtils.toPosixPath', () => {
|
||||
assert.strictEqual(core.toPosixPath, coreUtils.toPosixPath);
|
||||
});
|
||||
test('core.detectSubRepos === coreUtils.detectSubRepos', () => {
|
||||
assert.strictEqual(core.detectSubRepos, coreUtils.detectSubRepos);
|
||||
});
|
||||
test('core.extractOneLinerFromBody === coreUtils.extractOneLinerFromBody', () => {
|
||||
assert.strictEqual(core.extractOneLinerFromBody, coreUtils.extractOneLinerFromBody);
|
||||
});
|
||||
test('core.pathExistsInternal === coreUtils.pathExistsInternal', () => {
|
||||
assert.strictEqual(core.pathExistsInternal, coreUtils.pathExistsInternal);
|
||||
});
|
||||
test('core.generateSlugInternal === coreUtils.generateSlugInternal', () => {
|
||||
assert.strictEqual(core.generateSlugInternal, coreUtils.generateSlugInternal);
|
||||
});
|
||||
test('core.filterPlanFiles === coreUtils.filterPlanFiles', () => {
|
||||
assert.strictEqual(core.filterPlanFiles, coreUtils.filterPlanFiles);
|
||||
});
|
||||
test('core.filterSummaryFiles === coreUtils.filterSummaryFiles', () => {
|
||||
assert.strictEqual(core.filterSummaryFiles, coreUtils.filterSummaryFiles);
|
||||
});
|
||||
test('core.getPhaseFileStats === coreUtils.getPhaseFileStats', () => {
|
||||
assert.strictEqual(core.getPhaseFileStats, coreUtils.getPhaseFileStats);
|
||||
});
|
||||
test('core.readSubdirectories === coreUtils.readSubdirectories', () => {
|
||||
assert.strictEqual(core.readSubdirectories, coreUtils.readSubdirectories);
|
||||
});
|
||||
test('core.timeAgo === coreUtils.timeAgo', () => {
|
||||
assert.strictEqual(core.timeAgo, coreUtils.timeAgo);
|
||||
});
|
||||
test('extractCanonicalPlanId is NOT re-exported from core', () => {
|
||||
assert.strictEqual(typeof core.extractCanonicalPlanId, 'undefined');
|
||||
});
|
||||
test('extractCanonicalPlanId IS exported from coreUtils', () => {
|
||||
assert.strictEqual(typeof coreUtils.extractCanonicalPlanId, 'function');
|
||||
});
|
||||
});
|
||||
|
||||
// ─── toPosixPath ─────────────────────────────────────────────────────────────
|
||||
|
||||
describe('toPosixPath', () => {
|
||||
|
||||
Reference in New Issue
Block a user