wip
This commit is contained in:
@@ -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;
|
||||
});
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user