diff --git a/neode-ui/src/views/apps/__tests__/LightningChannels.test.ts b/neode-ui/src/views/apps/__tests__/LightningChannels.test.ts index 53adcc8a..fffb75b7 100644 --- a/neode-ui/src/views/apps/__tests__/LightningChannels.test.ts +++ b/neode-ui/src/views/apps/__tests__/LightningChannels.test.ts @@ -1,5 +1,6 @@ import { flushPromises, mount } from '@vue/test-utils' import { describe, expect, it, vi } from 'vitest' +import { createPinia } from 'pinia' import LightningChannels from '@/components/LightningChannelsPanel.vue' import { rpcClient } from '@/api/rpc-client' @@ -44,7 +45,11 @@ describe('LightningChannels', () => { total_outbound: 60_000, }) - const wrapper = mount(LightningChannels) + // The panel's setup pulls a Pinia store via useTxExplorer — mount with a + // fresh Pinia or setup throws before the first render. + const wrapper = mount(LightningChannels, { + global: { plugins: [createPinia()] }, + }) await flushPromises() expect(wrapper.text()).toContain('peer-pubkey')