Merge pull request #2131 from deepseek-harness/fix/web-favicon-dark-mode

fix(web): make the favicon follow the color scheme
This commit is contained in:
_Kerman
2026-08-11 14:58:43 +08:00
committed by GitHub
6 changed files with 75 additions and 1 deletions

View File

@@ -25,3 +25,11 @@ it('ships install metadata with the built web application', async () => {
}],
})
})
it('ships a favicon that switches to a light mark under dark color scheme', async () => {
const favicon = await readFile(join(DIST_ROOT, 'favicon.svg'), 'utf8')
// The light fill must live inside the dark-scheme media query, so the icon
// stays black in light mode and only turns white under a dark scheme.
expect(favicon).toMatch(/@media \(prefers-color-scheme: dark\)\s*{\s*path\s*{[^}]*fill:\s*#fff/i)
expect(favicon).toContain('fill="#000"')
})