Skip to content

Commit

Permalink
Merge pull request #308 from tf/override-async-features-in-tests
Browse files Browse the repository at this point in the history
Disable Bandwidth Feature Detection in Test Environment
  • Loading branch information
tf committed Jun 23, 2015
2 parents 14c8670 + c703052 commit 4103c26
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app/assets/javascripts/pageflow/browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ pageflow.browser = (function(){

var asyncHas = function(name) {
var runTest = function() {
if (pageflow.debugMode() &&
if ((pageflow.debugMode() || pageflow.ALLOW_FEATURE_OVERRIDES) &&
window.localStorage &&
typeof window.localStorage['override ' + name] !== 'undefined') {
var value = (window.localStorage['override ' + name] === 'on');
Expand Down
2 changes: 2 additions & 0 deletions spec/javascripts/support/fake_browser_features.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
pageflow.ALLOW_FEATURE_OVERRIDES = true;
pageflow.browser.on.high_bandwidth();

0 comments on commit 4103c26

Please sign in to comment.