Files
ComfyUI_frontend/browser_tests/globalSetupWithI18n.ts
snomiao f037567fc5 style: Apply Prettier formatting
- Fix trailing whitespace
- Add missing newlines at end of files
2025-09-02 21:17:27 +00:00

31 lines
745 B
TypeScript

/**
* Combined global setup for i18n collection tests
* Includes both regular setup and litegraph preprocessing
*/
import globalSetup from './globalSetup'
import { preprocessLitegraph } from './i18nSetup'
export default async function globalSetupWithI18n() {
// First preprocess litegraph files
await preprocessLitegraph()
// Then run regular global setup
await globalSetup()
// Register cleanup handlers
const cleanup = async () => {
const { restoreLitegraph } = await import('./i18nSetup')
await restoreLitegraph()
}
process.on('exit', cleanup)
process.on('SIGINT', async () => {
await cleanup()
process.exit(0)
})
process.on('SIGTERM', async () => {
await cleanup()
process.exit(0)
})
}