ConusAI vendor v0.1.0-dev.20261027+9b1131fb
ci / gate (push) Waiting to run

This commit is contained in:
ConusAI vendor v0.1.0-dev.20261027+9b1131fb
2026-10-27 18:05:17 +00:00
commit 3102273ec7
538 changed files with 80203 additions and 0 deletions
+20
View File
@@ -0,0 +1,20 @@
// SPDX-License-Identifier: LicenseRef-ConusAI-Template-1.0
// Starts the stack once for the whole run and stops it after (Playwright's global setup returns the
// teardown). The OCR the fake platform answers with is the documents module's own fixture: a three-page
// document with four labelled lines and a drawing page the extraction leaves out, which is what the specs review.
import { readFileSync } from "node:fs"
import { join } from "node:path"
import { APP_ROOT, startStack } from "./stack"
export default async function globalSetup(): Promise<() => Promise<void>> {
const document = JSON.parse(
readFileSync(join(APP_ROOT, "modules", "documents", "__tests__", "fixtures", "ocr-document.json"), "utf8"),
) as Record<string, unknown>
const stack = await startStack(document)
process.env.E2E_BASE_URL = stack.baseUrl
process.env.E2E_PLATFORM_URL = stack.platformUrl
return async () => {
await stack.stop()
}
}