Skip to content

Commit f314d02

Browse files
authored
fix: restore green CI after deps bump (#389)
1 parent c8e43f1 commit f314d02

3 files changed

Lines changed: 247 additions & 266 deletions

File tree

packages/hub-ui/src/index.test.ts

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,16 @@ describe('createUi branding background', () => {
1313
expect.assertions(6)
1414

1515
const html = readFileSync(fileURLToPath(new URL('../dist/client/standalone/index.html', import.meta.url)), 'utf8')
16+
// The build minifies the inline <style>, so match against the CSS with all
17+
// whitespace stripped rather than its authored spacing.
18+
const css = html.replace(/\s+/g, '')
1619

1720
expect(html).not.toContain('__hub-ui.css')
18-
expect(html).toContain('color-scheme: light')
19-
expect(html).toContain('--devframes-viewer-background: #fff')
20-
expect(html).toContain('--devframes-viewer-background: #111')
21-
expect(html).toContain('background: var(--devframes-viewer-background)')
22-
expect(html).not.toMatch(/html\.viewer-background-custom\s*\{[^}]*color-scheme:\s*normal/)
21+
expect(css).toContain('color-scheme:light')
22+
expect(css).toContain('--devframes-viewer-background:#fff')
23+
expect(css).toContain('--devframes-viewer-background:#111')
24+
expect(css).toContain('background:var(--devframes-viewer-background)')
25+
expect(css).not.toMatch(/html\.viewer-background-custom\{[^}]*color-scheme:normal/)
2326
})
2427

2528
it('preserves the default viewer background', () => {

0 commit comments

Comments
 (0)