feat: consulta pública de pedidos por código
This commit is contained in:
44
tests/setup.js
Normal file
44
tests/setup.js
Normal file
@@ -0,0 +1,44 @@
|
||||
import { afterEach, vi } from 'vitest'
|
||||
import { enableAutoUnmount } from '@vue/test-utils'
|
||||
|
||||
enableAutoUnmount(afterEach)
|
||||
|
||||
if (!navigator.clipboard) {
|
||||
navigator.clipboard = { writeText: vi.fn().mockResolvedValue(undefined) }
|
||||
}
|
||||
|
||||
if (typeof globalThis.ResizeObserver === 'undefined') {
|
||||
globalThis.ResizeObserver = class ResizeObserver {
|
||||
observe () {}
|
||||
unobserve () {}
|
||||
disconnect () {}
|
||||
}
|
||||
}
|
||||
|
||||
if (typeof globalThis.IntersectionObserver === 'undefined') {
|
||||
globalThis.IntersectionObserver = class IntersectionObserver {
|
||||
observe () {}
|
||||
unobserve () {}
|
||||
disconnect () {}
|
||||
takeRecords () {
|
||||
return []
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (typeof window.matchMedia !== 'function') {
|
||||
window.matchMedia = query => ({
|
||||
matches: false,
|
||||
media: query,
|
||||
onchange: null,
|
||||
addListener: () => {},
|
||||
removeListener: () => {},
|
||||
addEventListener: () => {},
|
||||
removeEventListener: () => {},
|
||||
dispatchEvent: () => false,
|
||||
})
|
||||
}
|
||||
|
||||
afterEach(() => {
|
||||
vi.restoreAllMocks()
|
||||
})
|
||||
Reference in New Issue
Block a user