fix(tests): update 5 source-text tests to read config-schema.cjs (#2480)
VALID_CONFIG_KEYS moved from config.cjs to config-schema.cjs in the drift-prevention companion PR. Tests that read config.cjs source text and checked for key literal includes() now point to the correct file. Closes #2480 Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -28,7 +28,7 @@ const { runGsdTools, createTempProject, cleanup } = require('./helpers.cjs');
|
|||||||
const AGENTS_DIR = path.join(__dirname, '..', 'agents');
|
const AGENTS_DIR = path.join(__dirname, '..', 'agents');
|
||||||
const COMMANDS_DIR = path.join(__dirname, '..', 'commands', 'gsd');
|
const COMMANDS_DIR = path.join(__dirname, '..', 'commands', 'gsd');
|
||||||
const WORKFLOWS_DIR = path.join(__dirname, '..', 'get-shit-done', 'workflows');
|
const WORKFLOWS_DIR = path.join(__dirname, '..', 'get-shit-done', 'workflows');
|
||||||
const CONFIG_PATH = path.join(__dirname, '..', 'get-shit-done', 'bin', 'lib', 'config.cjs');
|
const CONFIG_PATH = path.join(__dirname, '..', 'get-shit-done', 'bin', 'lib', 'config-schema.cjs');
|
||||||
|
|
||||||
// Plugin directory resolution (cross-platform safe)
|
// Plugin directory resolution (cross-platform safe)
|
||||||
const PLUGIN_WORKFLOWS_DIR = process.env.GSD_PLUGIN_ROOT || path.join(os.homedir(), '.claude', 'get-shit-done', 'workflows');
|
const PLUGIN_WORKFLOWS_DIR = process.env.GSD_PLUGIN_ROOT || path.join(os.homedir(), '.claude', 'get-shit-done', 'workflows');
|
||||||
|
|||||||
@@ -128,7 +128,7 @@ describe('use_worktrees config: cross-workflow structural coverage', () => {
|
|||||||
const DIAGNOSE_PATH = path.join(__dirname, '..', 'get-shit-done', 'workflows', 'diagnose-issues.md');
|
const DIAGNOSE_PATH = path.join(__dirname, '..', 'get-shit-done', 'workflows', 'diagnose-issues.md');
|
||||||
const EXECUTE_PLAN_PATH = path.join(__dirname, '..', 'get-shit-done', 'workflows', 'execute-plan.md');
|
const EXECUTE_PLAN_PATH = path.join(__dirname, '..', 'get-shit-done', 'workflows', 'execute-plan.md');
|
||||||
const PLANNING_CONFIG_PATH = path.join(__dirname, '..', 'get-shit-done', 'references', 'planning-config.md');
|
const PLANNING_CONFIG_PATH = path.join(__dirname, '..', 'get-shit-done', 'references', 'planning-config.md');
|
||||||
const CONFIG_CJS_PATH = path.join(__dirname, '..', 'get-shit-done', 'bin', 'lib', 'config.cjs');
|
const CONFIG_CJS_PATH = path.join(__dirname, '..', 'get-shit-done', 'bin', 'lib', 'config-schema.cjs');
|
||||||
|
|
||||||
test('quick workflow reads USE_WORKTREES from config', () => {
|
test('quick workflow reads USE_WORKTREES from config', () => {
|
||||||
const content = fs.readFileSync(QUICK_PATH, 'utf-8');
|
const content = fs.readFileSync(QUICK_PATH, 'utf-8');
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ const { runGsdTools, createTempProject, cleanup } = require('./helpers.cjs');
|
|||||||
const repoRoot = path.resolve(__dirname, '..');
|
const repoRoot = path.resolve(__dirname, '..');
|
||||||
const executePlanPath = path.join(repoRoot, 'get-shit-done', 'workflows', 'execute-plan.md');
|
const executePlanPath = path.join(repoRoot, 'get-shit-done', 'workflows', 'execute-plan.md');
|
||||||
const planningConfigPath = path.join(repoRoot, 'get-shit-done', 'references', 'planning-config.md');
|
const planningConfigPath = path.join(repoRoot, 'get-shit-done', 'references', 'planning-config.md');
|
||||||
const configCjsPath = path.join(repoRoot, 'get-shit-done', 'bin', 'lib', 'config.cjs');
|
const configCjsPath = path.join(repoRoot, 'get-shit-done', 'bin', 'lib', 'config-schema.cjs');
|
||||||
|
|
||||||
describe('inline_plan_threshold config key (#1979)', () => {
|
describe('inline_plan_threshold config key (#1979)', () => {
|
||||||
let tmpDir;
|
let tmpDir;
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ const fs = require('fs');
|
|||||||
const path = require('path');
|
const path = require('path');
|
||||||
|
|
||||||
const GSD_ROOT = path.join(__dirname, '..', 'get-shit-done');
|
const GSD_ROOT = path.join(__dirname, '..', 'get-shit-done');
|
||||||
const CONFIG_CJS_PATH = path.join(GSD_ROOT, 'bin', 'lib', 'config.cjs');
|
const CONFIG_CJS_PATH = path.join(GSD_ROOT, 'bin', 'lib', 'config-schema.cjs');
|
||||||
const CONFIG_TEMPLATE_PATH = path.join(GSD_ROOT, 'templates', 'config.json');
|
const CONFIG_TEMPLATE_PATH = path.join(GSD_ROOT, 'templates', 'config.json');
|
||||||
const PLAN_PHASE_PATH = path.join(GSD_ROOT, 'workflows', 'plan-phase.md');
|
const PLAN_PHASE_PATH = path.join(GSD_ROOT, 'workflows', 'plan-phase.md');
|
||||||
|
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ describe('Thinking Partner Integration (#1726)', () => {
|
|||||||
describe('Config integration', () => {
|
describe('Config integration', () => {
|
||||||
test('features.thinking_partner is in VALID_CONFIG_KEYS', () => {
|
test('features.thinking_partner is in VALID_CONFIG_KEYS', () => {
|
||||||
const configSrc = fs.readFileSync(
|
const configSrc = fs.readFileSync(
|
||||||
path.join(GSD_ROOT, 'bin', 'lib', 'config.cjs'),
|
path.join(GSD_ROOT, 'bin', 'lib', 'config-schema.cjs'),
|
||||||
'utf-8'
|
'utf-8'
|
||||||
);
|
);
|
||||||
assert.ok(
|
assert.ok(
|
||||||
|
|||||||
Reference in New Issue
Block a user