File tree 1 file changed +9
-2
lines changed
1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -16,14 +16,21 @@ describe('TinyPagination.vue', () => {
16
16
expect ( cmp . vm . currentPage ) . toBe ( 2 )
17
17
} )
18
18
19
- it ( 'Page 1 is the page by default' , ( ) => {
19
+ it ( 'when the component is created without page prop, Page 1 is the page by default' , ( ) => {
20
20
cmp = createComponent ( { total : 300 } )
21
21
expect ( cmp . vm . page ) . toBe ( 1 )
22
22
} )
23
23
24
- it ( 'English is the language by default' , ( ) => {
24
+ it ( 'when the component is created, English is the language by default' , ( ) => {
25
25
cmp = createComponent ( { total : 300 } )
26
26
expect ( cmp . vm . lang ) . toBe ( 'en' )
27
+ expect ( cmp . vm . translation . title ) . toBe ( 'Page' )
28
+ } )
29
+
30
+ it ( 'when the lang prop is set to spanish, the component is translated' , ( ) => {
31
+ cmp = createComponent ( { total : 300 , lang : 'es' } )
32
+ expect ( cmp . vm . lang ) . toBe ( 'es' )
33
+ expect ( cmp . vm . translation . title ) . toBe ( 'Página' )
27
34
} )
28
35
29
36
} )
You can’t perform that action at this time.
0 commit comments