Skip to content

Commit

Permalink
Test font properties
Browse files Browse the repository at this point in the history
  • Loading branch information
colepeters committed Jun 25, 2024
1 parent fa14be9 commit 9987c17
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
5 changes: 2 additions & 3 deletions v7/test/fixtures/styleguide.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,8 @@ export default {
maxInlineSize: '72ch',
},
fonts: {
sans: 'system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif',
serif: 'Georgia, Cambria, Times New Roman, Times, serif',
mono: 'Menlo, Monaco, Consolas, Liberation Mono, Courier New, monospace',
sans: 'Papyrus, Comic Sans, sans-serif',
serif: 'Wingdings, serif',
},
grid: {
steps: 6,
Expand Down
15 changes: 15 additions & 0 deletions v7/test/properties/fonts.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import test from 'tape'
import fonts from '../../properties/fonts.mjs'
import config from '../fixtures/styleguide.mjs'

test('config.fonts', t => {
t.ok(
fonts({ config })
.replaceAll(' ', '')
.replaceAll('\n', '')
.includes(':root{--font-sans:Papyrus,ComicSans,sans-serif;--font-serif:Wingdings,serif;}'),
'produces the expected font properties'
)
t.end()
})

0 comments on commit 9987c17

Please sign in to comment.