mirror of
https://github.com/deepseek-ai/deepseek-harness.git
synced 2026-08-29 04:26:38 +00:00
fix: sample dev web metadata at startup
This commit is contained in:
+10
-7
@@ -11,28 +11,31 @@ import {
|
||||
watchClientPlugins,
|
||||
} from './dev-web.ts'
|
||||
|
||||
it('reuses the verified complete-build environment for every watcher stage', async () => {
|
||||
it('samples one local environment at startup without validating watcher outputs', async () => {
|
||||
const root = await mkdtemp(join(tmpdir(), 'dsh-dev-web-environment-'))
|
||||
try {
|
||||
await mkdir(join(root, 'apps/web/dist'), { recursive: true })
|
||||
await mkdir(join(root, 'packages/client/example/lib'), { recursive: true })
|
||||
await writeFile(join(root, 'package.json'), JSON.stringify({ version: '1.2.3' }))
|
||||
await writeFile(join(root, 'apps/web/dist/index.html'), '<main></main>')
|
||||
await writeFile(join(root, 'packages/client/example/lib/client.js'), 'module.exports = {}\n')
|
||||
writeClientBuildRecord(root, {
|
||||
DSH_CLIENT_COMMIT_HASH: 'abc1234',
|
||||
DSH_CLIENT_GIT_DIRTY: 'true',
|
||||
DSH_CLIENT_VERSION: '1.2.3',
|
||||
DSH_CLIENT_BUILD_PROFILE: 'official',
|
||||
DSH_CLIENT_COMMIT_HASH: 'fffffff',
|
||||
DSH_CLIENT_TITLE: 'DeepSeek Harness',
|
||||
DSH_CLIENT_VERSION: '1.2.2',
|
||||
})
|
||||
await writeFile(join(root, 'packages/client/example/lib/client.js'), 'module.exports = { changed: true }\n')
|
||||
|
||||
expect(devWebBuildEnvironment(root, {
|
||||
PATH: '/bin',
|
||||
DSH_BUILD_CLIENT_PROFILE: 'official',
|
||||
DSH_CLIENT_COMMIT_HASH: 'stale',
|
||||
DSH_CLIENT_EXTRA: 'stale',
|
||||
DSH_CLIENT_COMMIT_HASH: 'abc1234',
|
||||
DSH_CLIENT_EXTRA: 'launch-value',
|
||||
})).toEqual({
|
||||
PATH: '/bin',
|
||||
DSH_CLIENT_COMMIT_HASH: 'abc1234',
|
||||
DSH_CLIENT_GIT_DIRTY: 'true',
|
||||
DSH_CLIENT_EXTRA: 'launch-value',
|
||||
DSH_CLIENT_VERSION: '1.2.3',
|
||||
})
|
||||
} finally {
|
||||
|
||||
Reference in New Issue
Block a user