From dd40c8caa2124284d0d09a61e1b9d4023e269ff1 Mon Sep 17 00:00:00 2001 From: Greenlamp2 <44787002+Greenlamp2@users.noreply.github.com> Date: Sat, 8 Jun 2024 22:24:57 +0200 Subject: [PATCH] added silent option to run tests and added a missing properties in the MockText (#1967) --- package.json | 1 + src/test/utils/mocks/mocksContainer/mockText.ts | 2 ++ 2 files changed, 3 insertions(+) diff --git a/package.json b/package.json index 2e87525aeaf..f100b3865d2 100644 --- a/package.json +++ b/package.json @@ -11,6 +11,7 @@ "test": "vitest run", "test:cov": "vitest run --coverage", "test:watch": "vitest watch --coverage", + "test:silent": "vitest run --silent", "eslint": "eslint --fix .", "eslint-ci": "eslint .", "docs": "typedoc" diff --git a/src/test/utils/mocks/mocksContainer/mockText.ts b/src/test/utils/mocks/mocksContainer/mockText.ts index f219a6d1bad..bfff146465e 100644 --- a/src/test/utils/mocks/mocksContainer/mockText.ts +++ b/src/test/utils/mocks/mocksContainer/mockText.ts @@ -7,9 +7,11 @@ export default class MockText { private scene; private textureManager; public list = []; + public style; constructor(textureManager, x, y, content, styleOptions) { this.scene = textureManager.scene; this.textureManager = textureManager; + this.style = {}; // Phaser.GameObjects.TextStyle.prototype.setStyle = () => null; // Phaser.GameObjects.Text.prototype.updateText = () => null; // Phaser.Textures.TextureManager.prototype.addCanvas = () => {};