mirror of
https://github.com/chriswritescode-dev/opencode-manager.git
synced 2026-12-06 04:44:21 +01:00
section 6: Phase 6: Config.Info validation owner and v2 config types in
This commit is contained in:
1 parent
66b5d1ac06
commit
48ca38c4e3
16 files changed
+232
-79
No files matched your search
@@ -86,8 +86,8 @@ describe('opencode-import service', () => {
|
||||
const jsoncPath = path.join(os.homedir(), '.config', 'opencode', 'opencode.jsonc')
|
||||
mockExistsSync.mockImplementation((candidate: string) => [jsonPath, jsoncPath].includes(candidate))
|
||||
mockFileExists.mockResolvedValue(false)
|
||||
const rawJson = '{"model":"lower"}'
|
||||
const rawJsonc = '{\n// keep\n"model":"higher"\n}'
|
||||
const rawJson = '{"model":"test/lower"}'
|
||||
const rawJsonc = '{\n// keep\n"model":"test/higher"\n}'
|
||||
mockReadFileContent.mockImplementation(async (candidate: string) => candidate === jsoncPath ? rawJsonc : rawJson)
|
||||
|
||||
const result = await syncOpenCodeImport({})
|
||||
@@ -115,7 +115,7 @@ describe('opencode-import service', () => {
|
||||
const legacyPath = path.join(os.homedir(), '.config', 'opencode', 'config.json')
|
||||
mockExistsSync.mockImplementation((candidate: string) => [jsonPath, legacyPath].includes(candidate))
|
||||
mockFileExists.mockResolvedValue(false)
|
||||
const rawJson = '{"model":"lower"}'
|
||||
const rawJson = '{"model":"test/lower"}'
|
||||
const rawLegacy = '{"theme":"dark"}'
|
||||
mockReadFileContent.mockImplementation(async (candidate: string) =>
|
||||
candidate === legacyPath ? rawLegacy : rawJson)
|
||||
|
||||
Reference in new issue
Block a user