@@ -80,8 +80,8 @@ describe("config.ts", () => {
8080 ) ;
8181 } ) ;
8282 } ) ;
83- it ( "should convert legacy values" , ( ) => {
84- const testCases = [
83+ describe ( "should convert legacy values" , ( ) => {
84+ it . for ( [
8585 { given : { quickTab : true } , expected : { quickRestart : "tab" } } ,
8686 { given : { smoothCaret : true } , expected : { smoothCaret : "medium" } } ,
8787 { given : { smoothCaret : false } , expected : { smoothCaret : "off" } } ,
@@ -140,18 +140,27 @@ describe("config.ts", () => {
140140 expected : { liveAccStyle : "mini" } ,
141141 } ,
142142 { given : { soundVolume : "0.5" } , expected : { soundVolume : 0.5 } } ,
143- ] ;
144-
145- //WHEN
146- testCases . forEach ( ( test ) => {
143+ { given : { funbox : "none" } , expected : { funbox : [ ] } } ,
144+ {
145+ given : { funbox : "58008#read_ahead" } ,
146+ expected : { funbox : [ "58008" , "read_ahead" ] } ,
147+ } ,
148+ {
149+ given : { customLayoutfluid : "qwerty#qwertz" } ,
150+ expected : { customLayoutfluid : [ "qwerty" , "qwertz" ] } ,
151+ } ,
152+ { given : { indicateTypos : false } , expected : { indicateTypos : "off" } } ,
153+ {
154+ given : { indicateTypos : true } ,
155+ expected : { indicateTypos : "replace" } ,
156+ } ,
157+ ] ) ( `$given` , ( { given, expected } ) => {
147158 const description = `given: ${ JSON . stringify (
148- test . given
149- ) } , expected: ${ JSON . stringify ( test . expected ) } `;
159+ given
160+ ) } , expected: ${ JSON . stringify ( expected ) } `;
150161
151- const result = migrateConfig ( test . given ) ;
152- expect ( result , description ) . toEqual (
153- expect . objectContaining ( test . expected )
154- ) ;
162+ const result = migrateConfig ( given ) ;
163+ expect ( result , description ) . toEqual ( expect . objectContaining ( expected ) ) ;
155164 } ) ;
156165 } ) ;
157166 } ) ;
0 commit comments