Skip to content

Commit 60ddcf2

Browse files
committed
Moved file to __tests__
1 parent c54d7da commit 60ddcf2

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

test/TinyPagination.spec.js renamed to __tests__/TinyPagination.spec.js

+9-2
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,21 @@ describe('TinyPagination.vue', () => {
1616
expect(cmp.vm.currentPage).toBe(2)
1717
})
1818

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', () => {
2020
cmp = createComponent({total: 300})
2121
expect(cmp.vm.page).toBe(1)
2222
})
2323

24-
it('English is the language by default', () => {
24+
it('when the component is created, English is the language by default', () => {
2525
cmp = createComponent({total: 300})
2626
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')
2734
})
2835

2936
})

0 commit comments

Comments
 (0)