feat(research): reproduce retained canonical runs with economic comparison

This commit is contained in:
Boki 2026-10-24 10:02:21 -04:00
parent e3bd708838
commit 30accfcf43
31 changed files with 2969 additions and 28 deletions

View file

@ -10,7 +10,13 @@ import type {
// Local to this file: no global preload, browser server or second test runner.
const browser = new GlobalWindow({ url: 'http://localhost:5173' });
const globals = ['window', 'document', 'WebSocket', 'IS_REACT_ACT_ENVIRONMENT'] as const;
const globals = [
'window',
'document',
'WebSocket',
'ResizeObserver',
'IS_REACT_ACT_ENVIRONMENT',
] as const;
const savedGlobals = new Map(
globals.map(key => [key, Object.getOwnPropertyDescriptor(globalThis, key)])
);
@ -252,6 +258,7 @@ beforeAll(async () => {
window: browser,
document: browser.document,
WebSocket: TestSocket,
ResizeObserver: browser.ResizeObserver,
IS_REACT_ACT_ENVIRONMENT: true,
}))
Object.defineProperty(globalThis, key, { configurable: true, writable: true, value });