File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed
packages/semantic-tokens/utils Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change
1
+ import { legacyFluentVariantsValues } from '../src/fluentLegacyVariants' ;
2
+ import tokens from '../scripts/tokens.json' ;
3
+ import { dedupeShadowTokens } from './dedupeShadowTokens' ;
4
+
5
+ const tokensJSON = dedupeShadowTokens ( tokens ) ;
6
+
7
+ describe ( 'Ensure all fluentLegacyVariants fallbacks are valid tokens' , ( ) => {
8
+ // We'll use this to catch any breaking changes in tokens.json
9
+ it ( 'Ensure originalToken in legacy fallback is valid' , ( ) => {
10
+ Object . keys ( legacyFluentVariantsValues ) . forEach ( fluentOverrideKey => {
11
+ console . log ( `Checking ${ fluentOverrideKey } ` ) ;
12
+ const legacyTokenOverride = legacyFluentVariantsValues [ fluentOverrideKey ] ! ;
13
+ expect ( tokensJSON [ legacyTokenOverride . originalToken as keyof typeof tokensJSON ] ) . toBeTruthy ( ) ;
14
+ } ) ;
15
+ } ) ;
16
+ } ) ;
You can’t perform that action at this time.
0 commit comments