mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-01-26 19:09:52 +00:00
## Summary Adds build time feature flags system starting with a flag that indicates whether subscription is required to use the app. This is only used on cloud. ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-6144-make-require-subscription-toggleable-in-build-2916d73d3650813bb140c5e96bcce1ce) by [Unito](https://www.unito.io)
24 lines
651 B
TypeScript
24 lines
651 B
TypeScript
import { vi } from 'vitest'
|
|
import 'vue'
|
|
|
|
// Define global variables for tests
|
|
globalThis.__COMFYUI_FRONTEND_VERSION__ = '1.24.0'
|
|
globalThis.__SENTRY_ENABLED__ = false
|
|
globalThis.__SENTRY_DSN__ = ''
|
|
globalThis.__ALGOLIA_APP_ID__ = ''
|
|
globalThis.__ALGOLIA_API_KEY__ = ''
|
|
globalThis.__USE_PROD_CONFIG__ = false
|
|
globalThis.__DISTRIBUTION__ = 'localhost'
|
|
globalThis.__BUILD_FLAGS__ = {
|
|
REQUIRE_SUBSCRIPTION: true
|
|
}
|
|
|
|
// Mock Worker for extendable-media-recorder
|
|
globalThis.Worker = vi.fn().mockImplementation(() => ({
|
|
postMessage: vi.fn(),
|
|
terminate: vi.fn(),
|
|
addEventListener: vi.fn(),
|
|
removeEventListener: vi.fn(),
|
|
dispatchEvent: vi.fn()
|
|
}))
|