File tree Expand file tree Collapse file tree 1 file changed +17
-1
lines changed
src/test/bin/colorDecisions Expand file tree Collapse file tree 1 file changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ import { same } from "evt/tools/inDepth/same";
5
5
6
6
console . log ( `Running test ${ __filename } ` ) ;
7
7
8
- const colorNames = [ "grey" , "orangeTerreBattue" ] ;
8
+ const colorNames = [ "grey" , "orangeTerreBattue" , "blueFrance" ] ;
9
9
10
10
const { parseColorDecisionName } = createParseColorDecisionName ( { colorNames } ) ;
11
11
@@ -88,3 +88,19 @@ const { parseColorDecisionName } = createParseColorDecisionName({ colorNames });
88
88
89
89
console . log ( "PASS 5" ) ;
90
90
}
91
+
92
+ {
93
+ const expected : ParsedColorDecisionName = {
94
+ "context" : "background" ,
95
+ "usage" : "action" ,
96
+ "variant" : "high" ,
97
+ "colorName" : "blueFrance" ,
98
+ "state" : undefined
99
+ } ;
100
+
101
+ const got = parseColorDecisionName ( "--background-action-high-blue-france" ) ;
102
+
103
+ assert ( same ( got , expected ) ) ;
104
+
105
+ console . log ( "PASS 6" ) ;
106
+ }
You can’t perform that action at this time.
0 commit comments