Fix annoying BBCodeText error messages in tests

This commit is contained in:
Sirz Benjie 2025-02-21 22:40:02 -06:00
parent 180a9cc054
commit f3c366e2b2
No known key found for this signature in database
GPG Key ID: 4A524B4D196C759E

View File

@ -15,6 +15,7 @@ import MockTextureManager from "#test/utils/mocks/mockTextureManager";
import fs from "fs";
import Phaser from "phaser";
import InputText from "phaser3-rex-plugins/plugins/inputtext";
import BBCodeText from "phaser3-rex-plugins/plugins/bbcodetext";
import { vi } from "vitest";
import { MockGameObjectCreator } from "./mocks/mockGameObjectCreator";
import InputManager = Phaser.Input.InputManager;
@ -33,7 +34,8 @@ Object.defineProperty(window, "console", {
value: mockConsoleLog(false),
});
BBCodeText.prototype.destroy = () => null;
BBCodeText.prototype.resize = () => null;
InputText.prototype.setElement = () => null;
InputText.prototype.resize = () => null;
Phaser.GameObjects.Image = MockImage;