File tree Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Original file line number Diff line number Diff line change
1
+ {
2
+ "auth.arr.0" : " foo" ,
3
+ "auth.arr.1" : " bar"
4
+ }
Original file line number Diff line number Diff line change @@ -173,3 +173,17 @@ it('resolves translated data with loader if there is only .php files for that la
173
173
174
174
expect ( wrapper . html ( ) ) . toBe ( '<h1>Ces identifiants ne correspondent pas à nos enregistrements.</h1>' )
175
175
} )
176
+
177
+
178
+ it ( 'translates arrays with $t mixin' , async ( ) => {
179
+ const wrapper = await global . mountPlugin ( `<h1 v-for="line in $t('auth.arr')">{{line}}</h1>` , 'de' ) ;
180
+
181
+ expect ( wrapper . html ( ) ) . toBe ( "<h1>foo</h1>\n<h1>bar</h1>" )
182
+ } )
183
+
184
+ it ( 'translates arrays with "trans" helper' , async ( ) => {
185
+ await global . mountPlugin ( undefined , 'de' ) ;
186
+
187
+ expect ( trans ( 'auth.arr' ) ) . toStrictEqual ( [ 'foo' , 'bar' ] ) ;
188
+ } )
189
+
You can’t perform that action at this time.
0 commit comments