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;
beforeAll(() => {
// Error when importing biomes / voucher (imported by different files)
vi.mock('./biomes', () => ({
biomeLinks: {},
BiomePoolTier: {},
PokemonPools: {},
getBiomeName: () => "",
BiomeTierTrainerPools: {},
biomePokemonPools: {},
biomeTrainerPools: {},
}));
// Prevent errors
vi.mock('./biomes', () => ({}));
vi.mock('../system/voucher', () => ({
vouchers: {},
VoucherType: {},
getVoucherTypeIcon: () => "",
Voucher: {},
getVoucherTypeName: () => "",
getVoucherTypeIcon: () => "",
}));
});

View File

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