Clean mocks

This commit is contained in:
Laeticia PIERRE 2024-05-09 11:16:25 +02:00
parent b9d1500375
commit 8706b816ae
2 changed files with 5 additions and 23 deletions

View File

@ -8,22 +8,12 @@ describe("trainer-config", () => {
let trainerConfig: TrainerConfig; let trainerConfig: TrainerConfig;
beforeAll(() => { beforeAll(() => {
// Error when importing biomes / voucher (imported by different files) // Prevent errors
vi.mock('./biomes', () => ({ vi.mock('./biomes', () => ({}));
biomeLinks: {},
BiomePoolTier: {},
PokemonPools: {},
getBiomeName: () => "",
BiomeTierTrainerPools: {},
biomePokemonPools: {},
biomeTrainerPools: {},
}));
vi.mock('../system/voucher', () => ({ vi.mock('../system/voucher', () => ({
vouchers: {},
VoucherType: {}, VoucherType: {},
getVoucherTypeIcon: () => "",
Voucher: {},
getVoucherTypeName: () => "", getVoucherTypeName: () => "",
getVoucherTypeIcon: () => "",
})); }));
}); });

View File

@ -4,16 +4,8 @@ import { GameDataType, getDataTypeKey } from "./game-data";
describe("game-data", () => { describe("game-data", () => {
describe("getDataTypeKey", () => { describe("getDataTypeKey", () => {
beforeAll(() => { beforeAll(() => {
// Error when importing biomes (imported by different files) // Prevent errors
vi.mock('../data/biomes', () => ({ vi.mock('../data/biomes', () => ({}));
biomeLinks: {},
BiomePoolTier: {},
PokemonPools: {},
getBiomeName: () => "",
BiomeTierTrainerPools: {},
biomePokemonPools: {},
biomeTrainerPools: {},
}));
}); });
afterAll(() => { afterAll(() => {