🧪 Simplify unit test by removing unnecessary mock data and adding a prerequisite function call

This commit is contained in:
2026-01-29 03:23:25 +00:00
parent 619aab0309
commit 6f72715726

View File

@@ -168,22 +168,16 @@ describe('useGamemasterFiles', () => {
});
it('should limit displayed lines to 10000', async () => {
// Create large content
const largeData = {
items: Array(15000).fill({ id: 1, name: 'test' })
};
mockClient.getPokemon.mockResolvedValueOnce(largeData);
composable.selectedFile.value = 'pokemon';
await composable.loadFile();
expect(composable.displayLines.value.length).toBeLessThanOrEqual(
composable.LINES_TO_DISPLAY
);
expect(composable.fileLines.value.length).toBeGreaterThan(10000);
});
it('should save last file preference', async () => {
await composable.loadStatus(); // Load status first
composable.selectedFile.value = 'moves';
await composable.loadFile();