mirror of
https://github.com/deepseek-ai/deepseek-harness.git
synced 2026-08-29 04:26:38 +00:00
27 lines
1002 B
TypeScript
27 lines
1002 B
TypeScript
/** Shell base styles stay independent from the dynamically loaded theme bundle. */
|
|
import { readFileSync } from 'node:fs'
|
|
import { fileURLToPath } from 'node:url'
|
|
import { describe, expect, it } from 'vitest'
|
|
|
|
const THEME_PACKAGE = '@deepseek-ai/dsh-client-ui-theme'
|
|
const baseCss = readFileSync(fileURLToPath(new URL('../src/base.css', import.meta.url)), 'utf8')
|
|
|
|
/**
|
|
* Import specifiers of the sheet, in source order. Quote style and surrounding
|
|
* whitespace are intentionally irrelevant; duplicate imports remain visible.
|
|
* @param css - stylesheet text.
|
|
* @returns import specifiers in declaration order.
|
|
*/
|
|
function importOrder(css: string): string[] {
|
|
return [...css.matchAll(/@import\s+['"]([^'"]+)['"]/g)].map(([, specifier = '']) => specifier)
|
|
}
|
|
|
|
const imports = importOrder(baseCss)
|
|
|
|
describe('web shell base.css', () => {
|
|
it('leaves theme styles to the dynamic ui-theme client entry', () => {
|
|
expect(imports).toEqual([])
|
|
expect(baseCss).not.toContain(THEME_PACKAGE)
|
|
})
|
|
})
|