Files
gmTouringMiniApp/test/setupTests.ts
T

17 lines
377 B
TypeScript

import { vi } from 'vitest'
import { unref } from 'vue'
const uniMock = {
canIUse: vi.fn(),
getLocation: vi.fn(),
getStorageSync: vi.fn(),
getSystemInfoSync: vi.fn(() => ({ uniPlatform: 'mp-weixin' })),
removeStorageSync: vi.fn(),
setStorageSync: vi.fn(),
setStorage: vi.fn(),
showToast: vi.fn(),
}
vi.stubGlobal('uni', uniMock)
vi.stubGlobal('unref', unref)