fix: restore Theme 2 font families

This commit is contained in:
Lain Soykaf 2026-08-11 21:51:24 +04:00
commit 341b1c1c3e
No known key found for this signature in database
5 changed files with 75 additions and 2 deletions

View file

@ -0,0 +1,24 @@
import { hasInvalidCachedThemeRules } from 'src/services/style_setter/style_setter.js'
describe('style setter cache', () => {
it('rejects cached rules containing serialized objects', () => {
expect(
hasInvalidCachedThemeRules([
['html { --font: [object Object]; }'],
['.post { --font: sans-serif; }'],
]),
).to.equal(true)
})
it('accepts cached rules containing valid font families', () => {
expect(
hasInvalidCachedThemeRules([
['html { --font: sans-serif; }'],
[
'.post { --font: "Atkinson Hyperlegible"; }',
'.post::after { content: "[object Object]"; }',
],
]),
).to.equal(false)
})
})