remove the duplicate document.fonts code (#2282)

This commit is contained in:
Devin Korb 2024-06-16 00:37:02 -04:00 committed by GitHub
parent 728ee3809a
commit e10d67858f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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" });