Files

25 lines
903 B
TypeScript

import { readFileSync } from 'node:fs'
import { describe, expect, it } from 'vitest'
// The template renders with browser-default styling unless the root layout
// imports the global stylesheet (seen on stage 2026-10-10: the deployed
// dashboard answered 200 with zero CSS linked). The layout is the one module
// every page passes through, so its import is the whole contract.
describe('global stylesheet', () => {
const layout = readFileSync(
new URL('../src/app/layouts/root.tsx', import.meta.url),
'utf8',
)
it('is imported by the root layout', () => {
expect(layout).toMatch(/import\s+['"]\.\.\/globals\.css['"]/)
})
it('exists and carries the design tokens', () => {
const css = readFileSync(new URL('../src/app/globals.css', import.meta.url), 'utf8')
expect(css).toContain(':root')
expect(css).toContain('--accent')
expect(css).toContain('main')
})
})