mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-01-18 15:00:55 +00:00
remove the duplicate document.fonts code (#2282)
This commit is contained in:
parent
728ee3809a
commit
e10d67858f
@ -50,30 +50,6 @@ describe("Test for BattleStat Localization", () => {
|
||||
const battleStatLevelUnits: BattleStatLevelTestUnit[] = [];
|
||||
|
||||
beforeAll(() => {
|
||||
const fontFaceSetMock = {
|
||||
add: jest.fn(),
|
||||
load: jest.fn().mockResolvedValue([]),
|
||||
check: jest.fn().mockReturnValue(true),
|
||||
ready: Promise.resolve(),
|
||||
};
|
||||
|
||||
const proxyHandler = {
|
||||
get: (target, prop) => {
|
||||
if (prop in target) {
|
||||
return target[prop];
|
||||
} else {
|
||||
return document.fonts[prop];
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
const fontsProxy = new Proxy(fontFaceSetMock, proxyHandler);
|
||||
|
||||
Object.defineProperty(document, "fonts", {
|
||||
value: fontsProxy,
|
||||
configurable: true,
|
||||
});
|
||||
|
||||
initI18n();
|
||||
|
||||
battleStatUnits.push({ stat: BattleStat.ATK, key: "Stat.ATK" });
|
||||
|
Loading…
x
Reference in New Issue
Block a user