Created
July 9, 2014 17:04
-
-
Save kasbah/f5c06122aaad69652021 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function() { | |
var countries, country, json, key, one_test, test_bom; | |
countries = get_local("data/countries.json"); | |
test_bom = get_local("data/big_example.tsv", json = false); | |
one_test = function(country) { | |
stop(); | |
return chrome.storage.local.set({ | |
country: country | |
}, function() { | |
return chrome.storage.local.remove("bom", function() { | |
return (new BomManager).addToBOM(test_bom, function(that) { | |
return that.emptyCarts(function(result) { | |
deepEqual(result.success, true); | |
return that.fillCarts(function(result) { | |
deepEqual(result.success, true); | |
deepEqual(result.fails, []); | |
return start(); | |
}); | |
}); | |
}); | |
}); | |
}); | |
}; | |
for (key in countries) { | |
country = countries[key]; | |
QUnit.test("User Sim " + country, function() { | |
console.log(country); | |
return one_test(country); | |
}); | |
} | |
}).call(this); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment