Skip to content

Instantly share code, notes, and snippets.

@kasbah
Created July 9, 2014 17:04
Show Gist options
  • Save kasbah/f5c06122aaad69652021 to your computer and use it in GitHub Desktop.
Save kasbah/f5c06122aaad69652021 to your computer and use it in GitHub Desktop.
(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