From ae176d82b915ff84ff24344d03a3fa8addc59cc1 Mon Sep 17 00:00:00 2001 From: Lloyd Hilaiel <lloyd@hilaiel.com> Date: Thu, 14 Jun 2012 11:40:27 +0300 Subject: [PATCH] fix the fragile static-resource-test - when adding keys to lib/static_resources.js all indexes get shuffled. broken with addition of relay.js. --- tests/static-resource-test.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/static-resource-test.js b/tests/static-resource-test.js index 2a3645950..ceda594e4 100755 --- a/tests/static-resource-test.js +++ b/tests/static-resource-test.js @@ -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; -- GitLab