🔧 Add async handling to test cases in GamemasterExplorer unit tests

This commit is contained in:
2026-01-29 05:05:42 +00:00
parent 6f6ddb3660
commit dbf60a4860

View File

@@ -126,7 +126,7 @@ describe('GamemasterExplorer', () => {
expect(wrapper.text()).toContain('Loading Gamemaster Explorer');
});
it('shows error state when fileError exists', () => {
it('shows error state when fileError exists', async () => {
const { useGamemasterFiles } = await import(
'../../../src/composables/useGamemasterFiles.js'
);
@@ -148,7 +148,7 @@ describe('GamemasterExplorer', () => {
expect(wrapper.text()).toContain('Failed to load files');
});
it('shows no files state when hasFiles is false', () => {
it('shows no files state when hasFiles is false', async () => {
const { useGamemasterFiles } = await import(
'../../../src/composables/useGamemasterFiles.js'
);
@@ -230,7 +230,7 @@ describe('GamemasterExplorer', () => {
expect(backLink.attributes('to')).toBe('/');
});
it('calls loadStatus on mount', () => {
it('calls loadStatus on mount', async () => {
const { useGamemasterFiles } = await import(
'../../../src/composables/useGamemasterFiles.js'
);