test: LightningChannels mounts with Pinia — panel setup now uses the tx-explorer store
All checks were successful
Demo images / Build & push demo images (push) Successful in 3m5s

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
archipelago 2026-07-24 04:42:52 -04:00
parent 0cd2164d24
commit 408c605001

View File

@ -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')