-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: concatenate contiguous font-family tokens (#2219)
- Loading branch information
1 parent
d7d17ad
commit bacfadf
Showing
2 changed files
with
53 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import {deepEqual} from 'assert'; | ||
import {Parser} from '../../syntax/parser'; | ||
import {fontFamily} from '../font-family'; | ||
|
||
const fontFamilyParse = (value: string) => fontFamily.parse(Parser.parseValues(value)); | ||
|
||
describe('property-descriptors', () => { | ||
describe('font-family', () => { | ||
it('sans-serif', () => | ||
deepEqual(fontFamilyParse('sans-serif'), [ | ||
"sans-serif", | ||
])); | ||
|
||
it('great fonts 40 library', () => | ||
deepEqual(fontFamilyParse('great fonts 40 library'), [ | ||
"'great fonts 40 library'", | ||
])); | ||
|
||
it('preferred font, "quoted fallback font", font', () => | ||
deepEqual(fontFamilyParse('preferred font, "quoted fallback font", font'), [ | ||
"'preferred font'", | ||
"'quoted fallback font'", | ||
"font" | ||
])); | ||
|
||
it("'escaping test\\'s font'", () => | ||
deepEqual(fontFamilyParse("'escaping test\\'s font'"), [ | ||
"'escaping test\'s font'", | ||
])); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters