This commit is contained in:
2025-12-12 21:39:48 +01:00
parent ddbd99b747
commit cae81b1088
49 changed files with 777 additions and 269 deletions

View File

@@ -14,7 +14,12 @@ describe('Companion UI - hosted workflow via fixture-backed real stack', () => {
beforeAll(async () => {
originalEnv = process.env.NODE_ENV;
originalFixtureFlag = process.env.COMPANION_FIXTURE_HOSTED;
process.env.NODE_ENV = 'test';
Object.defineProperty(process.env, 'NODE_ENV', {
value: 'test',
writable: true,
enumerable: true,
configurable: true
});
process.env.COMPANION_FIXTURE_HOSTED = '1';
DIContainer.resetInstance();
@@ -32,7 +37,12 @@ describe('Companion UI - hosted workflow via fixture-backed real stack', () => {
afterAll(async () => {
await container.shutdown();
process.env.NODE_ENV = originalEnv;
Object.defineProperty(process.env, 'NODE_ENV', {
value: originalEnv,
writable: true,
enumerable: true,
configurable: true
});
process.env.COMPANION_FIXTURE_HOSTED = originalFixtureFlag;
});

View File

@@ -95,7 +95,7 @@ describeMaybe('Real-site hosted session Race Information step (members.iraci
'03-race-information.json',
);
const raw = await fs.readFile(fixturePath, 'utf8');
const items = JSON.parse(raw) as unknown[];
const items = JSON.parse(raw) as Array<{ i: string; t: string }>;
const sidebarItem =
items.find(
(i) =>
@@ -103,7 +103,7 @@ describeMaybe('Real-site hosted session Race Information step (members.iraci
typeof i.t === 'string',
) ?? null;
if (sidebarItem) {
fixtureSidebarText = sidebarItem.t as string;
fixtureSidebarText = sidebarItem.t;
}
} catch {
fixtureSidebarText = null;