1
0
mirror of https://github.com/lancedikson/bowser synced 2026-03-02 03:40:27 +00:00

Fix strict mode logic

This commit is contained in:
Nir Rattner
2016-07-06 17:01:02 -04:00
parent bb200a8fb0
commit 65dfb0918c
2 changed files with 13 additions and 5 deletions

View File

@@ -112,11 +112,21 @@ describe('Unsupported browser check', function() {
assert.equal(unsupported, false);
});
it('should be passed by #isUnsupportedBrowser for IE10.6 and for IE10 miminal version specified in strict mode', function() {
var unsupported = browser.isUnsupportedBrowser({msie: "10"}, true, this.ie10_6);
assert.equal(unsupported, false);
});
it('should NOT be passed by #check for IE10.6 and for IE11 miminal version specified', function() {
var supported = browser.check({msie: "11"}, this.ie10_6);
assert.equal(supported, false);
});
it('should NOT be passed by #check for IE10.6 and for IE11 miminal version specified in strict mode', function() {
var supported = browser.check({msie: "11"}, true, this.ie10_6);
assert.equal(supported, false);
});
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);