@@ -11,6 +11,13 @@ import {
11
11
isPropertyHack ,
12
12
isValuePrefixed ,
13
13
hasVendorPrefix ,
14
+ cssKeywords ,
15
+ KeywordSet ,
16
+ // Color exports
17
+ namedColors ,
18
+ systemColors ,
19
+ colorFunctions ,
20
+ colorKeywords ,
14
21
} from "./index.js"
15
22
16
23
const Api = suite ( "Public API" )
@@ -55,6 +62,32 @@ Api('exposes the "hasVendorPrefix" method', () => {
55
62
assert . is ( typeof hasVendorPrefix , "function" )
56
63
} )
57
64
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
+
58
91
Api ( "does not break on CSS Syntax Errors" , ( ) => {
59
92
assert . not . throws ( ( ) => analyze ( "test, {}" ) )
60
93
assert . not . throws ( ( ) => analyze ( "test { color red }" ) )
0 commit comments