Skip to content

Commit 75beb3a

Browse files
committed
increase coverage
1 parent 8792569 commit 75beb3a

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

test/basic.spec.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,10 @@ describe('basic suite', function() {
6969
expect(select.val()).toBe('banana');
7070
});
7171

72+
it('highlight() should return undefined if index is undefined', function () {
73+
expect(select.data('selectric').highlight(undefined)).toBe(undefined);
74+
});
75+
7276
it('should not be bigger than max-height', function() {
7377
select.selectric({
7478
maxHeight: 120

test/mobile.spec.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,13 @@ describe('mobile', function() {
107107
expect($('.selectric-wrapper').find('.label').text()).toBe('Apple');
108108
});
109109
});
110+
111+
it('open() should return false on mobile', function () {
112+
spyOn(select.data('selectric').utils, 'isMobile').and.returnValue(true);
113+
spyOn(select.data('selectric').options, 'nativeOnMobile').and.returnValue(true);
114+
expect(select.data('selectric').open()).toBe(false);
115+
});
116+
110117
});
111118

112119
describe('Multi Selects', function () {

0 commit comments

Comments
 (0)