mirror of
https://github.com/zoriya/v10.git
synced 2026-08-09 07:37:48 +00:00
fix(core): stub pointer:fine in tooltip touch suppression tests (#998)
This commit is contained in:
@@ -107,10 +107,10 @@ describe('createTooltip', () => {
|
||||
describe('touch pointer suppression', () => {
|
||||
beforeEach(() => {
|
||||
vi.useFakeTimers();
|
||||
// jsdom lacks matchMedia — stub so popover's canHover() returns true,
|
||||
// allowing us to test that the tooltip layer blocks touch independently.
|
||||
// jsdom lacks matchMedia — stub so popover's canHover() and canOpenOnFocus()
|
||||
// return true, allowing us to test that the tooltip layer blocks touch independently.
|
||||
vi.stubGlobal('matchMedia', (query: string) => ({
|
||||
matches: query === '(hover: hover)',
|
||||
matches: query === '(hover: hover)' || query === '(pointer: fine)',
|
||||
media: query,
|
||||
addEventListener: vi.fn(),
|
||||
removeEventListener: vi.fn(),
|
||||
|
||||
Reference in New Issue
Block a user