🔧 Add async handling to test cases in GamemasterExplorer unit tests
This commit is contained in:
@@ -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'
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user