Skip to content

Commit

Permalink
test: Mock _oc_webroot for frontend unit tests
Browse files Browse the repository at this point in the history
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
  • Loading branch information
susnux committed Jul 10, 2024
1 parent 262dcad commit 36b8e3b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions __tests__/jest-setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,6 @@ import 'jest-location-mock'

// Mock `window.fetch` with Jest
import 'jest-fetch-mock'

// Mock webroot to be empty
(window as unknown as Record<string, unknown>)._oc_webroot = ''

0 comments on commit 36b8e3b

Please sign in to comment.