teqo-backup/tests/unit/opsListPage.unit.spec.ts
Cursor Agent 45eaabd23c
CL3: align provider nesting and tighten OpsList types
Wrap the estimate-scenario provider outside both flag paths, type empty
as nullable, and drop the duplicated fail-closed unit assertion.

Co-authored-by: Francisco Solla <fsolla@users.noreply.github.com>
2026-08-01 22:31:07 +00:00

16 lines
676 B
TypeScript

import { readFileSync } from 'node:fs'
import { join } from 'node:path'
import { describe, expect, it } from 'vitest'
const MUNICIPIOS_PAGE = join(process.cwd(), 'src/app/(campaign)/campanha/(app)/municipios/page.tsx')
describe('OpsListPage municipios tracer (CL3)', () => {
it('wires LIST_UNIFIED behind OpsListPage on the municipios route', () => {
const source = readFileSync(MUNICIPIOS_PAGE, 'utf8')
expect(source).toContain('resolveListUnifiedEnabled')
expect(source).toContain('OpsListPage')
expect(source).toContain("from '@/components/campaign/shared/OpsListPage'")
expect(source).toContain("from '@/lib/opsListRegistry/opsListFlag'")
})
})