mock-applicationConfig.ts 512 B

1234567891011121314151617
  1. // Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
  2. import { useApplicationStore } from '#shared/stores/application.ts'
  3. import type { ConfigList } from '#shared/types/store.ts'
  4. import { initializePiniaStore } from './components/renderComponent.ts'
  5. export const mockApplicationConfig = async (config: Partial<ConfigList>) => {
  6. initializePiniaStore()
  7. const application = useApplicationStore()
  8. application.config = {
  9. ...application.config,
  10. ...config,
  11. } as ConfigList
  12. }