mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-23 00:04:06 +00:00
- Remove prebuild-litegraph.js and restore-litegraph.js scripts - Add i18nSetup.ts module for litegraph TypeScript 'declare' keyword preprocessing - Create ComfyPageNoUser fixture to avoid user creation conflicts in i18n tests - Update playwright.i18n.config.ts to use integrated setup/teardown - Simplify collect-i18n command to just run Playwright tests - Ensure pnpm collect-i18n works correctly 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
30 lines
750 B
TypeScript
30 lines
750 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)
|
|
})
|
|
} |