// @vitest-environment jsdom
import { render } from '@testing-library/react'
import { describe, expect, it } from 'vitest'
import { CliErrorPanel } from './CliErrorPanel'
describe('CliErrorPanel not-found', () => {
it('gives app advice, not npm, when the bundled engine is unreachable', () => {
const { container } = render()
expect(container.textContent).toContain('reinstall the app from codeburn.app')
expect(container.textContent).not.toContain('npm')
})
it('tells the user to allow CodeBurn when access was denied', () => {
const { container } = render()
expect(container.textContent).toContain('Security software')
expect(container.textContent).not.toContain('npm')
})
it('keeps the npm advice when no bundled CLI is configured', () => {
const { container } = render()
expect(container.textContent).toContain('npm i -g codeburn')
})
})