Add deterministic-tests workspace

Scripted multi-client harness against a real server (~110 scenario
tests, server-control, managed-websocket, test-runner). Wires the new
package into frontend/package.json workspaces and the lint script.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Andras Schmelczer 2026-05-08 22:11:16 +01:00
parent 4482e0155f
commit a33e4bbcb9
129 changed files with 7626 additions and 1 deletions

View file

@ -0,0 +1,43 @@
import type { AssertableState } from "../utils/assertable-state";
import type { TestDefinition } from "../test-definition";
export const resetClearsRecentlyDeletedResurrectionTest: TestDefinition = {
description:
"Client 0 deletes a file. Client 1 toggles sync off and on " +
"(simulating reconnect). The deleted file should NOT reappear " +
"on Client 1 after the sync reset.",
clients: 2,
steps: [
{
type: "create",
client: 0,
path: "ghost.md",
content: "should be deleted"
},
{ type: "enable-sync", client: 0 },
{ type: "enable-sync", client: 1 },
{ type: "barrier" },
{ type: "delete", client: 0, path: "ghost.md" },
{ type: "barrier" },
{
type: "assert-consistent",
verify: (s: AssertableState): void => {
s.assertFileNotExists("ghost.md");
}
},
{ type: "disable-sync", client: 1 },
{ type: "enable-sync", client: 1 },
{ type: "barrier" },
{
type: "assert-consistent",
verify: (s: AssertableState): void => {
s.assertFileCount(0);
}
}
]
};