Skip to content
Snippets Groups Projects
Commit ae176d82 authored by Lloyd Hilaiel's avatar Lloyd Hilaiel
Browse files

fix the fragile static-resource-test - when adding keys to...

fix the fragile static-resource-test - when adding keys to lib/static_resources.js all indexes get shuffled.  broken with addition of relay.js.
parent ce0630ae
No related branches found
No related tags found
No related merge requests found
......@@ -23,7 +23,7 @@ suite.addBatch({
var res = resources.resources;
assert.ok(files['/production/dialog.css'].length >= 3);
// Get ride of non-localized asset bundles
['/production/communication_iframe.js', '/production/include.js', '/production/dialog.css', '/production/browserid.css', '/production/ie8_main.css', '/production/ie8_dialog.css'].forEach(
['/production/communication_iframe.js', '/production/include.js', '/production/dialog.css', '/production/browserid.css', '/production/ie8_main.css', '/production/ie8_dialog.css', '/production/relay.js'].forEach(
function (nonLocaleAsset) {
delete res[nonLocaleAsset];
delete files[nonLocaleAsset];
......@@ -43,13 +43,13 @@ suite.addBatch({
assert.equal(files[minFile].length,
res[minRes].length);
// Non-localized files underneath stay the same
[0, 1, 2, 3, 4, 5, 6, 8].forEach(function (nonLocalizedIndex) {
assert.equal(files[minFile][nonLocalizedIndex],
res[minRes][nonLocalizedIndex]);
[0, 1, 2, 3, 4, 5, 6, 7].forEach(function (nonLocalizedIndex) {
assert.equal(files[minFile][nonLocalizedIndex],
res[minRes][nonLocalizedIndex]);
});
// Fragile - filename with :locale...
// When fixing this test case... console.log(res[Object.keys(res)[0]]);
var localeIndex = 7;
var localeIndex = 8;
assert.notEqual(files[minFile][localeIndex],
res[minRes][localeIndex]);
var counter = 0;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment