Skip to content

Commit

Permalink
Fix IIIFURLAdapter mock
Browse files Browse the repository at this point in the history
Co-authored-by: Anna Headley <[email protected]>
  • Loading branch information
eliotjordan and hackartisan committed Jan 23, 2024
1 parent a771600 commit 1bb4891
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions app/javascript/test/viewer/uv_manager.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,13 +81,7 @@ describe('UVManager', () => {
return 'https://figgy.princeton.edu/uv/uv_config.json'
} else { return null }
})

// This makes it so global.UV.URLDataProvider.get returns our mock data
const provider = vi.fn().mockImplementation(() => {
return { get: getResult }
})
global.UV = { URLDataProvider: provider }
global.createUV = vi.fn()
global.getResult = getResult
// Allow window location assign
const location = window.location
vi.spyOn(location, 'assign').mockImplementation(() => true)
Expand Down

0 comments on commit 1bb4891

Please sign in to comment.