@@ -11,6 +11,13 @@ import {
1111 isPropertyHack ,
1212 isValuePrefixed ,
1313 hasVendorPrefix ,
14+ cssKeywords ,
15+ KeywordSet ,
16+ // Color exports
17+ namedColors ,
18+ systemColors ,
19+ colorFunctions ,
20+ colorKeywords ,
1421} from "./index.js"
1522
1623const Api = suite ( "Public API" )
@@ -55,6 +62,32 @@ Api('exposes the "hasVendorPrefix" method', () => {
5562 assert . is ( typeof hasVendorPrefix , "function" )
5663} )
5764
65+ Api ( 'exposes the namedColors KeywordSet' , ( ) => {
66+ assert . ok ( namedColors . has ( 'Red' ) )
67+ } )
68+
69+ Api ( 'exposes the systemColors KeywordSet' , ( ) => {
70+ assert . ok ( systemColors . has ( 'LinkText' ) )
71+ } )
72+
73+ Api ( 'exposes the colorFunctions KeywordSet' , ( ) => {
74+ assert . ok ( colorFunctions . has ( 'okLAB' ) )
75+ } )
76+
77+ Api ( 'exposes the colorKeywords KeywordSet' , ( ) => {
78+ assert . ok ( colorKeywords . has ( 'TRANSPARENT' ) )
79+ } )
80+
81+ Api ( 'exposes CSS keywords KeywordSet' , ( ) => {
82+ assert . ok ( cssKeywords . has ( 'Auto' ) )
83+ assert . ok ( cssKeywords . has ( 'inherit' ) )
84+ } )
85+
86+ Api ( 'exposes the KeywordSet class' , ( ) => {
87+ assert . is ( typeof KeywordSet , 'function' )
88+ assert . is ( ( new KeywordSet ( ) ) . constructor . name , 'KeywordSet' )
89+ } )
90+
5891Api ( "does not break on CSS Syntax Errors" , ( ) => {
5992 assert . not . throws ( ( ) => analyze ( "test, {}" ) )
6093 assert . not . throws ( ( ) => analyze ( "test { color red }" ) )
0 commit comments