Skip to content

Commit

Permalink
Skip broken Firefox test
Browse files Browse the repository at this point in the history
When exercising the polyfill in Firefox, the invalid JSON parsing error
will cripple the test suite, causing cascading failures in Mocha HTML
output as well as cause failures in unrelated tests.

The code fix was proposed JakeChampion#157 but we decided not to pull it since it's
a Firefox bug and Firefox now ships with native fetch anyway. Instead,
we avoid running that test as part of our polyfill test suite.
  • Loading branch information
mislav committed Jan 18, 2016
1 parent 796e9bf commit 4dce072
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ exercise.forEach(function(exerciseMode) {

var nativeChrome = /Chrome\//.test(navigator.userAgent) && exerciseMode === 'native'
var nativeFirefox = /Firefox\//.test(navigator.userAgent) && exerciseMode === 'native'
var polyfillFirefox = /Firefox\//.test(navigator.userAgent) && exerciseMode === 'polyfill'

test('resolves promise on 500 error', function() {
return fetch('/boom').then(function(response) {
Expand Down Expand Up @@ -696,7 +697,7 @@ suite('Body mixin', function() {
})
})

test('handles json parse error', function() {
featureDependent(test, !polyfillFirefox, 'handles json parse error', function() {
return fetch('/json-error').then(function(response) {
return response.json()
}).catch(function(error) {
Expand Down

0 comments on commit 4dce072

Please sign in to comment.