mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-01-26 19:09:52 +00:00
22 lines
602 B
TypeScript
22 lines
602 B
TypeScript
import { FullConfig } from '@playwright/test'
|
|
import dotenv from 'dotenv'
|
|
|
|
import { backupPath } from './utils/backupUtils'
|
|
|
|
dotenv.config()
|
|
|
|
export default function globalSetup(config: FullConfig) {
|
|
if (!process.env.CI) {
|
|
if (process.env.TEST_COMFYUI_DIR) {
|
|
backupPath([process.env.TEST_COMFYUI_DIR, 'user'])
|
|
backupPath([process.env.TEST_COMFYUI_DIR, 'models'], {
|
|
renameAndReplaceWithScaffolding: true
|
|
})
|
|
} else {
|
|
console.warn(
|
|
'Set TEST_COMFYUI_DIR in .env to prevent user data (settings, workflows, etc.) from being overwritten'
|
|
)
|
|
}
|
|
}
|
|
}
|