mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-17 22:02:18 +02:00
Use vi function mocks
This commit is contained in:
parent
e93e366d93
commit
fe4cec8197
@ -52,9 +52,8 @@ export default class MockContainer implements MockGameObject {
|
||||
/// Sets the position of this Game Object to be a relative position from the source Game Object.
|
||||
}
|
||||
|
||||
setInteractive(hitArea?, callback?, dropZone?) {
|
||||
/// Sets the InteractiveObject to be a drop zone for a drag and drop operation.
|
||||
}
|
||||
setInteractive = vi.fn();
|
||||
|
||||
setOrigin(x, y) {
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
|
@ -1,5 +1,6 @@
|
||||
import Phaser from "phaser";
|
||||
import { MockGameObject } from "../mockGameObject";
|
||||
import { vi } from "vitest";
|
||||
import Sprite = Phaser.GameObjects.Sprite;
|
||||
import Frame = Phaser.Textures.Frame;
|
||||
|
||||
@ -101,9 +102,7 @@ export default class MockSprite implements MockGameObject {
|
||||
return this.phaserSprite.stop();
|
||||
}
|
||||
|
||||
setInteractive(hitArea, hitAreaCallback, dropZone) {
|
||||
return null;
|
||||
}
|
||||
setInteractive = vi.fn();
|
||||
|
||||
on(event, callback, source) {
|
||||
return this.phaserSprite.on(event, callback, source);
|
||||
|
@ -197,9 +197,7 @@ export default class MockText implements MockGameObject {
|
||||
this.color = color;
|
||||
});
|
||||
|
||||
setInteractive(hitArea, hitAreaCallback, dropZone) {
|
||||
return null;
|
||||
}
|
||||
setInteractive = vi.fn();
|
||||
|
||||
setShadowColor(color) {
|
||||
// Sets the shadow color.
|
||||
|
Loading…
Reference in New Issue
Block a user