Skip to content

Commit

Permalink
remove inaccurate caniuse mapping, fix caniuse bool comparison
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickkettner committed Feb 26, 2015
1 parent 15b5400 commit 75ff7b8
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions test/browser/integration/caniuse.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ window.caniusecb = function(caniuse) {
displaytable: 'css-table',
draganddrop: 'dragndrop',
eventsource: 'eventsource',
exiforientation: 'css-image-orientation',
fileinput: 'forms',
filereader: 'fileapi',
filesystem: 'filesystem',
Expand Down Expand Up @@ -156,7 +155,8 @@ window.caniusecb = function(caniuse) {
// if caniuse gave us a 'partial', lets let it pass with a note.
if (o.caniuseResult.indexOf('a') === 0) {
return it(o.browser + o.version + ': Caniuse reported partial support for ' + o.ciufeature, function() {
expect(ciubool).to.equal(o.result.valueOf());
var modernizrResult = o.result instanceof Boolean ? o.result.valueOf() : !!o.result;
expect(ciubool).to.equal(modernizrResult);
});
}

Expand All @@ -168,7 +168,8 @@ window.caniusecb = function(caniuse) {

// where we actually do most our assertions
it(o.browser + o.version + ': Caniuse result for ' + o.ciufeature + ' matches Modernizr\'s ' + (o.fp ? '*false positive*' : 'result') + ' for ' + o.feature, function() {
expect(ciubool).to.equal(o.result.valueOf());
var modernizrResult = o.result instanceof Boolean ? o.result.valueOf() : !!o.result;
expect(ciubool).to.equal(modernizrResult);
});
}

Expand Down

0 comments on commit 75ff7b8

Please sign in to comment.