Makelore 2.0 initial clean snapshot
This commit is contained in:
24
tests/unit/works-publish-helpers.test.ts
Normal file
24
tests/unit/works-publish-helpers.test.ts
Normal file
@@ -0,0 +1,24 @@
|
||||
import { describe, expect, it } from 'vitest';
|
||||
import { buildDeployProductBuildPrompt } from '@/lib/works-publish-helpers';
|
||||
|
||||
describe('deployment product build prompt', () => {
|
||||
it('requires three-state machine evidence without blocking on missing local tools', () => {
|
||||
const prompt = buildDeployProductBuildPrompt({
|
||||
projectName: '测试作品',
|
||||
projectPath: '/tmp/test-project',
|
||||
zipPath: null,
|
||||
});
|
||||
|
||||
expect(prompt).toContain('works-deploy-check.json');
|
||||
expect(prompt).toContain('compose_config');
|
||||
expect(prompt).toContain('fresh_directory_smoke');
|
||||
expect(prompt).toContain('sandbox_browser_smoke');
|
||||
expect(prompt).toContain('execution: unavailable');
|
||||
expect(prompt).toContain('Main 会在交接文件就绪');
|
||||
expect(prompt).toContain('不要让用户去服务器手动启动 Docker');
|
||||
expect(prompt).toContain('PASS、SKIPPED、BLOCKED');
|
||||
expect(prompt).toContain('Docker 或浏览器自动化不可用时写 SKIPPED');
|
||||
expect(prompt).toContain('zip_sha256');
|
||||
expect(prompt).toContain('哈希不一致仍然 BLOCKED');
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user