steam-backlog-enforcer/web/src/layouts/shellCredit.test.ts
Krzysztof kuhy Rudnicki 9725e48044
Some checks are pending
md-naming / markdown naming convention (push) Waiting to run
pre-commit / pre-commit (${{ matrix.group }}) (mypy, mypy, ) (push) Waiting to run
pre-commit / pre-commit (${{ matrix.group }}) (pylint, pylint, ) (push) Waiting to run
pre-commit / pre-commit (${{ matrix.group }}) (rest, , mypy,pylint,dependency-freshness) (push) Waiting to run
Tests / test (push) Waiting to run
Tests / web-coverage (push) Waiting to run
repo-contract / repo contract (push) Waiting to run
Put my logo everywhere
Todo: 7808ee0a
2026-11-21 08:59:46 +01:00

24 lines
874 B
TypeScript

import { describe, it, expect } from 'vitest'
import { readFileSync } from 'node:fs'
import { resolve } from 'node:path'
describe('Shell layout credit component', () => {
it('contains kuhy-credit with placement="below" after health-badges', () => {
const shellPath = resolve(import.meta.dirname, 'Shell.astro')
const content = readFileSync(shellPath, 'utf-8')
const healthBadgesIdx = content.indexOf('<health-badges></health-badges>')
const creditIdx = content.indexOf('<kuhy-credit placement="below"></kuhy-credit>')
expect(healthBadgesIdx).toBeGreaterThan(-1)
expect(creditIdx).toBeGreaterThan(-1)
expect(creditIdx).toBeGreaterThan(healthBadgesIdx)
})
it('registers kuhy-credit custom element', async () => {
await import('@kuhyx/kuhy-credit')
const el = customElements.get('kuhy-credit')
expect(el).toBeDefined()
})
})