Skip to content

Commit

Permalink
fix: mock revoke url
Browse files Browse the repository at this point in the history
  • Loading branch information
segunadebayo committed Sep 30, 2024
1 parent 0b5ecee commit 18177a7
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/react/src/setup-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ window.Element.prototype.scrollTo = () => {}
window.Element.prototype.scrollIntoView = () => {}
window.requestAnimationFrame = (cb) => setTimeout(cb, 1000 / 60)
window.URL.createObjectURL = () => 'https://i.pravatar.cc/300'
window.URL.revokeObjectURL = () => {}

Object.defineProperty(window, 'navigator', {
value: {
Expand Down
1 change: 1 addition & 0 deletions packages/solid/src/setup-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ export const getExports = <T extends string>(anatomy: AnatomyInstance<T>) => {
global.document.execCommand = () => true
global.ResizeObserver = ResizeObserver
global.URL.createObjectURL = () => 'https://i.pravatar.cc/300'
global.URL.revokeObjectURL = () => {}
global.Element.prototype.scrollIntoView = () => {
// no-op
}
Expand Down
1 change: 1 addition & 0 deletions packages/vue/src/setup-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ window.Element.prototype.scrollIntoView = () => {
}
window.requestAnimationFrame = (cb) => setTimeout(cb, 1000 / 60)
window.URL.createObjectURL = () => 'https://i.pravatar.cc/300'
window.URL.revokeObjectURL = () => {}

// stub Array.prototype.toSorted (used in zag.js collection)
// @ts-ignore
Expand Down

0 comments on commit 18177a7

Please sign in to comment.