@@ -5,9 +5,19 @@ describe("remote-loader", () => {
55 it ( "should compile correctly JSON messages coming from the fly" , async ( ) => {
66 const unlink = createConfig ( "minimal" )
77 const messages = await simulatedJsonResponse ( )
8- const remoteMessages = remoteLoader ( { format : "minimal" , messages} )
8+ const remoteMessages = remoteLoader ( { format : "minimal" , messages } )
99 expect ( remoteMessages ) . toMatchInlineSnapshot ( `
1010 Object {
11+ customKey: Array [
12+ Array [
13+ someVariable,
14+ select,
15+ Object {
16+ other: SomeOtherText,
17+ someVarValue: SomeTextHere,
18+ },
19+ ],
20+ ],
1121 property.key: value,
1222 {0} Deposited: Array [
1323 Array [
@@ -36,6 +46,16 @@ describe("remote-loader", () => {
3646 expect ( remoteLoader ( { format : "minimal" , messages, fallbackMessages } ) )
3747 . toMatchInlineSnapshot ( `
3848 Object {
49+ customKey: Array [
50+ Array [
51+ someVariable,
52+ select,
53+ Object {
54+ other: SomeOtherText,
55+ someVarValue: SomeTextHere,
56+ },
57+ ],
58+ ],
3959 property.key: value,
4060 {0} Deposited: Array [
4161 Array [
@@ -62,11 +82,12 @@ function simulatedJsonResponse(nully?: boolean) {
6282 "property.key" : nully ? "" : "value" ,
6383 "{0} Deposited" : "{0} Deposited" ,
6484 "{0} Strategy" : "{0} Strategy" ,
85+ customKey :
86+ "{someVariable, select, someVarValue {SomeTextHere} other {SomeOtherText}}" ,
6587 } )
6688 } )
6789}
6890
69-
7091function createConfig ( format : string ) {
7192 const filename = `${ process . cwd ( ) } /.linguirc`
7293 const config = `
0 commit comments