mirror of
https://wget.la/https://github.com/Wxw-Gu/WechatExplorer
synced 2026-08-21 21:47:00 +08:00
refactor(ui): 统一迁移原生按钮、输入框及交互控件
This commit is contained in:
@@ -2,6 +2,21 @@ import '@testing-library/jest-dom/vitest'
|
||||
import { cleanup } from '@testing-library/react'
|
||||
import { afterEach, vi } from 'vitest'
|
||||
|
||||
if (!HTMLElement.prototype.hasPointerCapture) {
|
||||
Object.defineProperties(HTMLElement.prototype, {
|
||||
hasPointerCapture: { configurable: true, value: () => false },
|
||||
releasePointerCapture: { configurable: true, value: () => undefined },
|
||||
setPointerCapture: { configurable: true, value: () => undefined }
|
||||
})
|
||||
}
|
||||
|
||||
if (!HTMLElement.prototype.scrollIntoView) {
|
||||
Object.defineProperty(HTMLElement.prototype, 'scrollIntoView', {
|
||||
configurable: true,
|
||||
value: () => undefined
|
||||
})
|
||||
}
|
||||
|
||||
afterEach(() => cleanup())
|
||||
|
||||
function createMemoryStorage(): Storage {
|
||||
|
||||
Reference in New Issue
Block a user