Files
repomix-mirror/tests/testing/packSpecConfig.ts
Kazuki YamadaandClaude Opus 5.5 beb407f8ce test(packager): Share the merged config builder of the real-pipeline pack specs
intent(pack-spec-config): multiRootSpec and securityScanSpec carried identical buildMergedConfig copies
decision(pack-spec-config): move it to tests/testing/packSpecConfig.ts as buildPackSpecConfig with style defaulting to xml
rejected(pack-spec-config): adding it to testUtils.ts, that would pull configLoad into every test importing testUtils
rejected(processed-file-fixtures): sharing createMockProcessedFiles between jsonStyle and packSkill tests, the file lists are test-specific data (different files and contents that each suite asserts on)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 00:02:19 +09:00

22 lines
758 B
TypeScript

import { mergeConfigs } from '../../src/config/configLoad.js';
import type { RepomixConfigFile, RepomixConfigMerged, RepomixOutputStyle } from '../../src/config/configSchema.js';
/**
* Build a fully merged config for the real-pipeline pack spec tests: the given
* output file and style, with every git feature off so the spec never shells out
* to git against its tmpdir fixture.
*/
export const buildPackSpecConfig = (
cwd: string,
outputFilePath: string,
style: RepomixOutputStyle = 'xml',
overrides: Partial<RepomixConfigFile> = {},
): RepomixConfigMerged =>
mergeConfigs(cwd, overrides, {
output: {
filePath: outputFilePath,
style,
git: { sortByChanges: false, includeDiffs: false, includeLogs: false },
},
});