mirror of
				https://github.com/pagefaultgames/pokerogue.git
				synced 2025-10-31 08:25:58 +01:00 
			
		
		
		
	* Rename `Abilities` to `AbilityId` * Rename `abilities.ts` to `ability-id.ts` * Rename `Moves` to `MoveId` * Rename `moves.ts` to `move-id.ts` * Rename `Species` to `SpeciesId` * Rename `species.ts` to `species-id.ts` * Rename `Biome` to `BiomeId` * Rename `biome.ts` to `biome-id.ts` * Replace `Abilities` with `AbilityId` in comments * Replace `Biome` with `BiomeId` in comments * Replace `Moves` with `MoveId` in comments * Replace `Species` with `SpeciesId` in comments
		
			
				
	
	
		
			35 lines
		
	
	
		
			967 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
			
		
		
	
	
			35 lines
		
	
	
		
			967 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
| import { initStatsKeys } from "#app/ui/game-stats-ui-handler";
 | |
| import { describe, expect, it } from "vitest";
 | |
| 
 | |
| async function importModule() {
 | |
|   try {
 | |
|     initStatsKeys();
 | |
|     const { PokemonMove } = await import("#app/field/pokemon");
 | |
|     const { SpeciesId: Species } = await import("#enums/species-id");
 | |
|     return {
 | |
|       PokemonMove,
 | |
|       Species,
 | |
|     };
 | |
|     // Dynamically import the module
 | |
|   } catch (error) {
 | |
|     // Log the error stack trace
 | |
|     console.error("Error during import:", error.stack);
 | |
|     // Rethrow the error to ensure the test fails
 | |
|     throw error;
 | |
|   }
 | |
| }
 | |
| 
 | |
| describe("tests to debug the import, with trace", () => {
 | |
|   it("import PokemonMove module", async () => {
 | |
|     const module = await importModule();
 | |
|     // Example assertion
 | |
|     expect(module.PokemonMove).toBeDefined();
 | |
|   });
 | |
| 
 | |
|   it("import Species module", async () => {
 | |
|     const module = await importModule();
 | |
|     // Example assertion
 | |
|     expect(module.Species).toBeDefined();
 | |
|   });
 | |
| });
 |