fix project instruction review findings

This commit is contained in:
Yichen Jiang
2026-07-01 18:51:50 +08:00
parent 0691048e47
commit e23a6902e7
7 changed files with 167 additions and 21 deletions
+9
View File
@@ -6,6 +6,7 @@ import {
DSH_HOME_DIR_NAME,
defaultDshHome,
expandHomePath,
resolveDshHome,
} from '@deepseek-ai/dsh-paths'
describe('dsh path helpers', () => {
@@ -22,4 +23,12 @@ describe('dsh path helpers', () => {
expect(expandHomePath('/tmp/.dsh')).toBe('/tmp/.dsh')
expect(expandHomePath('~other/.dsh')).toBe('~other/.dsh')
})
it('resolves explicit DSH home before environment and default locations', () => {
const envHome = join(homedir(), 'env-dsh')
expect(resolveDshHome(undefined, { DSH_HOME: '~/env-dsh' })).toBe(envHome)
expect(resolveDshHome('/tmp/explicit-dsh', { DSH_HOME: '~/env-dsh' })).toBe('/tmp/explicit-dsh')
expect(resolveDshHome(undefined, {})).toBe(defaultDshHome())
})
})