Skip to content

Commit b1b71db

Browse files
authored
[Test] Fix annoying BBCodeText error messages in tests (#5395)
1 parent 7a015e0 commit b1b71db

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/test/utils/gameWrapper.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import MockTextureManager from "#test/utils/mocks/mockTextureManager";
1515
import fs from "fs";
1616
import Phaser from "phaser";
1717
import InputText from "phaser3-rex-plugins/plugins/inputtext";
18+
import BBCodeText from "phaser3-rex-plugins/plugins/bbcodetext";
1819
import { vi } from "vitest";
1920
import { MockGameObjectCreator } from "./mocks/mockGameObjectCreator";
2021
import InputManager = Phaser.Input.InputManager;
@@ -33,7 +34,8 @@ Object.defineProperty(window, "console", {
3334
value: mockConsoleLog(false),
3435
});
3536

36-
37+
BBCodeText.prototype.destroy = () => null;
38+
BBCodeText.prototype.resize = () => null;
3739
InputText.prototype.setElement = () => null;
3840
InputText.prototype.resize = () => null;
3941
Phaser.GameObjects.Image = MockImage;

0 commit comments

Comments
 (0)