mirror of
https://github.com/lancedikson/bowser
synced 2026-03-02 03:40:27 +00:00
Throw an error when minVersion map has not a string as a browser version
fixes #165
This commit is contained in:
@@ -127,6 +127,12 @@ describe('Unsupported browser check', function() {
|
||||
assert.equal(supported, false);
|
||||
});
|
||||
|
||||
it('should throw an error when minVersion map has a number, but not a string', function() {
|
||||
assert.throws(() => {
|
||||
browser.check({msie: 11}, this.ie10_6);
|
||||
}, /Browser version in the minVersion map should be a string/);
|
||||
});
|
||||
|
||||
it('should be passed by #check for IE10.6 when version was not specified', function() {
|
||||
var supported = browser.check({}, this.ie10_6);
|
||||
assert.equal(supported, true);
|
||||
|
||||
Reference in New Issue
Block a user