Skip to content
This repository was archived by the owner on May 29, 2019. It is now read-only.

Commit f56a396

Browse files
bekospkozlowski-opensource
authored andcommitted
test(pagination): add test for full coverage
1 parent 32f0f63 commit f56a396

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Diff for: src/pagination/test/pagination.spec.js

+6-1
Original file line numberDiff line numberDiff line change
@@ -179,13 +179,18 @@ describe('pagination directive', function () {
179179
});
180180

181181
describe('when `page` is not a number', function () {
182-
it('handles string', function() {
182+
it('handles numerical string', function() {
183183
updateCurrentPage('2');
184184
expect(getPaginationEl(2)).toHaveClass('active');
185185

186186
updateCurrentPage('04');
187187
expect(getPaginationEl(4)).toHaveClass('active');
188188
});
189+
190+
it('defaults to 1 if non-numeric', function() {
191+
updateCurrentPage('pizza');
192+
expect(getPaginationEl(1)).toHaveClass('active');
193+
});
189194
});
190195

191196
describe('with `max-size` option', function () {

0 commit comments

Comments
 (0)