feat: Sprint 1 — Playwright e2e + sandbox orchestration (TDD)
Mirror to GitHub / mirror (push) Canceled after 0s
Mirror to GitHub / mirror (push) Canceled after 0s
- e2e: Playwright chat-flow (sign up -> chat) with api/web webServer harness - api: sandbox services subset/media-proxy/manifest/gc + DockerClient contract - api: SandboxManager orchestrator (fake-Docker tested); /health route - 53 unit tests green; Playwright e2e green
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
import { describe, it, expect } from 'vitest';
|
||||
import { diffManifest } from '../../src/sandbox/manifest.ts';
|
||||
|
||||
describe('diffManifest', () => {
|
||||
it('detects added, changed, and removed paths', () => {
|
||||
const before = {
|
||||
'/theme/style.css': 'a1',
|
||||
'/theme/theme.json': 'b2',
|
||||
'/theme/old.css': 'c3',
|
||||
};
|
||||
const after = {
|
||||
'/theme/style.css': 'a1',
|
||||
'/theme/theme.json': 'b2-new',
|
||||
'/theme/new.css': 'd4',
|
||||
};
|
||||
|
||||
expect(diffManifest(before, after)).toEqual({
|
||||
added: ['/theme/new.css'],
|
||||
changed: ['/theme/theme.json'],
|
||||
removed: ['/theme/old.css'],
|
||||
});
|
||||
});
|
||||
|
||||
it('reports empty arrays when nothing changed', () => {
|
||||
const manifest = { '/a.css': 'x' };
|
||||
expect(diffManifest(manifest, { ...manifest })).toEqual({ added: [], changed: [], removed: [] });
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user