diff --git a/docs/design-lint.md b/docs/design-lint.md index dbb70b106..0dbc7a329 100644 --- a/docs/design-lint.md +++ b/docs/design-lint.md @@ -41,8 +41,11 @@ gstack-design-lint [--render] [--url ] [--scope pa either; outside any project it is bounded only by the disk, and only `.css` files are read. - Markup inside an HTML comment is dead for every rule, a commented-out - `

Hello there

?Help
' }).findings; + expect(only(tip('opacity 0.2s'), 'tooltip-focus-delay')).toEqual([]); + expect(only(tip('opacity .5s ease'), 'tooltip-focus-delay')).toEqual([]); + expect(only(tip('opacity 0.2s 1s'), 'tooltip-focus-delay').map((f) => f.grade)).toEqual(['ask']); + expect(only(tip('opacity 200ms 600ms'), 'tooltip-focus-delay').map((f) => f.grade)).toEqual(['ask']); + }); + + test('one emoji-decoration per emoji icon in a component file, keyed by the icon and not by the wording', () => { + const { findings } = lintDir({ 'Card.tsx': 'export function Card() { return
\u{1F680}
; }' }); + expect(only(findings, 'emoji-decoration').map((f) => f.evidence)).toEqual(['emoji icon "\u{1F680}" in ']); + }); + + test('the emoji classes spell their variation selector and joiner as escapes', () => { + expect(fs.readFileSync(path.join(import.meta.dir, '../lib/design-lint/rules/assets.ts'), 'utf8')).not.toMatch(/[\uFE0F\u200D]/); + }); +});