Created
February 13, 2015 08:14
-
-
Save EragonJ/1578818c090a9f2ea77a to your computer and use it in GitHub Desktop.
This file contains 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
diff --git a/apps/settings/test/unit/icc_test.js b/apps/settings/test/unit/icc_test.js | |
index a6bd1d8..fc0194c 100644 | |
--- a/apps/settings/test/unit/icc_test.js | |
+++ b/apps/settings/test/unit/icc_test.js | |
@@ -62,13 +62,6 @@ suite('STK (App menu) >', function() { | |
mocksHelper = new MocksHelper(mocksForIccApp); | |
mocksHelper.suiteSetup(); | |
- HtmlImports.populate(function() { | |
- window.addEventListener('iccPageLoaded', function onLoaded(event) { | |
- done(); | |
- }); | |
- requireApp('settings/js/icc.js'); | |
- }); | |
- | |
this.STK_NEXT_ACTION_INDICATOR = { | |
16: 'stkItemsNaiSetUpCall', | |
17: 'stkItemsNaiSendSs', | |
@@ -177,6 +170,24 @@ suite('STK (App menu) >', function() { | |
} | |
} | |
}}}); | |
+ | |
+ HtmlImports.populate(function() { | |
+ var map = { | |
+ 'shared/stk_helper': 'shared_mocks/mock_stk_helper' | |
+ }; | |
+ | |
+ testRequire([ | |
+ 'shared_mocks/mock_stk_helper' | |
+ ], map, function(MockStkHelper) { | |
+ // we have to replace `require` in icc.js | |
+ window.require = function(modules, callback) { | |
+ callback(MockStkHelper); | |
+ }; | |
+ testRequire(['icc'], {}, function() { | |
+ done(); | |
+ }); | |
+ }); | |
+ }); | |
}); | |
suiteTeardown(function() { |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment