test: refs #8647 fix warning
This commit is contained in:
parent
287c61f507
commit
9961f5cda0
|
@ -1,18 +1,27 @@
|
|||
import { describe, expect, it, beforeEach } from 'vitest';
|
||||
import { describe, expect, it, beforeEach, beforeAll } from 'vitest';
|
||||
import { setActivePinia, createPinia } from 'pinia';
|
||||
|
||||
import { useStateQueryStore } from 'src/stores/useStateQueryStore';
|
||||
|
||||
describe('useStateQueryStore', () => {
|
||||
const stateQueryStore = useStateQueryStore();
|
||||
const { add, isLoading, remove, reset } = useStateQueryStore();
|
||||
let stateQueryStore;
|
||||
let add, isLoading, remove, reset;
|
||||
const firstQuery = { url: 'myQuery' };
|
||||
|
||||
function getQueries() {
|
||||
return stateQueryStore.queries;
|
||||
}
|
||||
beforeAll(() => {
|
||||
setActivePinia(createPinia());
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
stateQueryStore = useStateQueryStore();
|
||||
({ add, isLoading, remove, reset } = useStateQueryStore());
|
||||
|
||||
reset();
|
||||
|
||||
// setActivePinia(createPinia());
|
||||
expect(getQueries().size).toBeFalsy();
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in New Issue