fix: duplication tests pointer state leaking between tests (#9414)

* fix: duplication tests pointer state leaking between tests

* fix snapshots
This commit is contained in:
David Luzar
2025-04-18 11:11:12 +02:00
committed by GitHub
parent a5d6939826
commit b5d60973b7
6 changed files with 28 additions and 24 deletions
+8 -1
View File
@@ -180,10 +180,17 @@ export class Pointer {
public clientX = 0;
public clientY = 0;
static activePointers: Pointer[] = [];
static resetAll() {
Pointer.activePointers.forEach((pointer) => pointer.reset());
}
constructor(
private readonly pointerType: "mouse" | "touch" | "pen",
private readonly pointerId = 1,
) {}
) {
Pointer.activePointers.push(this);
}
reset() {
this.clientX = 0;