Skip to content

Commit c568664

Browse files
committed
updated with microservices changes
1 parent 6e3801c commit c568664

File tree

1 file changed

+10
-14
lines changed

1 file changed

+10
-14
lines changed

tests/unit/stores/Infra.nuxt.test.js

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@ beforeEach(async () => {
2626
createSpy: vi.fn,
2727
})
2828
setActivePinia(pinia)
29-
const infra_store = useInfraStore()
30-
infra_store.$reset?.()
3129
})
3230

3331
describe("Infra Store", () => {
@@ -121,40 +119,38 @@ describe("Infra Store", () => {
121119
describe("is_busy", () => {
122120
test("test geode false & viewer false", () => {
123121
const infra_store = useInfraStore()
124-
infra_store.init_microservices()
125122
const geode_store = useGeodeStore()
126123
const viewer_store = useViewerStore()
127-
geode_store.$patch({ is_busy: false })
128-
viewer_store.$patch({ is_busy: false })
124+
geode_store.is_busy = false
125+
viewer_store.is_busy = false
126+
infra_store.init_microservices()
127+
129128
expect(infra_store.microservices_busy).toBe(false)
130129
})
131130
test("test geode true & viewer false", () => {
132131
const infra_store = useInfraStore()
133-
infra_store.init_microservices()
134132
const geode_store = useGeodeStore()
135133
const viewer_store = useViewerStore()
136-
geode_store.$patch({ is_busy: true })
137-
viewer_store.$patch({ is_busy: false })
134+
geode_store.is_busy = true
135+
viewer_store.is_busy = false
138136
infra_store.init_microservices()
139137
expect(infra_store.microservices_busy).toBe(true)
140138
})
141139
test("test geode false & viewer true", () => {
142140
const infra_store = useInfraStore()
143-
infra_store.init_microservices()
144141
const geode_store = useGeodeStore()
145142
const viewer_store = useViewerStore()
146-
geode_store.$patch({ is_busy: false })
147-
viewer_store.$patch({ is_busy: true })
143+
geode_store.is_busy = false
144+
viewer_store.is_busy = true
148145
infra_store.init_microservices()
149146
expect(infra_store.microservices_busy).toBe(true)
150147
})
151148
test("test geode true & viewer true", () => {
152149
const infra_store = useInfraStore()
153-
infra_store.init_microservices()
154150
const geode_store = useGeodeStore()
155151
const viewer_store = useViewerStore()
156-
geode_store.$patch({ is_busy: true })
157-
viewer_store.$patch({ is_busy: true })
152+
geode_store.is_busy = true
153+
viewer_store.is_busy = true
158154
infra_store.init_microservices()
159155
expect(infra_store.microservices_busy).toBe(true)
160156
})

0 commit comments

Comments
 (0)