Files
explorer-monorepo/frontend/src/utils/publicExplorer.test.ts
defiQUG b87ebee6a1
Some checks failed
Deploy Explorer Live / deploy (push) Failing after 20s
Validate Explorer / frontend (push) Failing after 24s
Validate Explorer / smoke-e2e (push) Has been skipped
feat(explorer): dual-chain wallet metadata, native coin pricing, and UI refresh.
Add Chain 138 wallet network metadata and stats coin-price enrichment; sync frontend explorer SPA, command center, and address/token pages with backend config.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-19 16:16:17 -07:00

19 lines
697 B
TypeScript

import { describe, expect, it } from 'vitest'
import { resolveExplorerApiBase } from '@/libs/frontend-api-client/api-base'
import { getPublicExplorerBase } from '@/utils/publicExplorer'
describe('getPublicExplorerBase', () => {
it('matches resolveExplorerApiBase with explorer.d-bis.org SSR fallback', () => {
expect(getPublicExplorerBase()).toBe(
resolveExplorerApiBase({
envValue: process.env.NEXT_PUBLIC_API_URL,
serverFallback: 'https://explorer.d-bis.org',
}),
)
})
it('does not default to blockscout.defi-oracle.io when env is empty on the server', () => {
expect(getPublicExplorerBase()).not.toBe('https://blockscout.defi-oracle.io')
})
})