add gstack 2 parity and lifecycle gates

This commit is contained in:
Sinabina
2026-07-17 11:08:32 -07:00
parent b6572ebbb7
commit 9919c4cdd3
212 changed files with 29098 additions and 3845 deletions
+12 -4
View File
@@ -15,8 +15,8 @@
import { describe, test, expect, beforeAll, afterAll } from 'bun:test';
import { BrowserManager } from '../../browse/src/browser-manager';
import { handleReadCommand } from '../../browse/src/read-commands';
import { handleWriteCommand } from '../../browse/src/write-commands';
import { handleReadCommand as dispatchReadCommand } from '../../browse/src/read-commands';
import { handleWriteCommand as dispatchWriteCommand } from '../../browse/src/write-commands';
import { generateCompareHtml } from '../src/compare';
import * as fs from 'fs';
import * as path from 'path';
@@ -28,6 +28,14 @@ let tmpDir: string;
let boardHtmlPath: string;
let serverState: string;
function handleReadCommand(command: string, args: string[]) {
return dispatchReadCommand(command, args, bm.getActiveSession(), bm);
}
function handleWriteCommand(command: string, args: string[]) {
return dispatchWriteCommand(command, args, bm.getActiveSession(), bm);
}
function createTestPng(filePath: string): void {
const png = Buffer.from(
'iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8/58BAwAI/AL+hc2rNAAAAABJRU5ErkJggg==',
@@ -121,10 +129,10 @@ beforeAll(async () => {
await bm.launch();
});
afterAll(() => {
afterAll(async () => {
try { server.stop(); } catch {}
try { await bm.close(1000); } catch {}
fs.rmSync(tmpDir, { recursive: true, force: true });
setTimeout(() => process.exit(0), 500);
});
// ─── The critical test: browser click → file on disk ─────────────