mirror of
https://github.com/Mibew/i18n.git
synced 2025-01-22 21:40:28 +03:00
Fix JavaScript Unit tests
This commit is contained in:
parent
47ccc46359
commit
72e58f0959
@ -10,20 +10,20 @@
|
|||||||
<div id="qunit"></div>
|
<div id="qunit"></div>
|
||||||
<div id="qunit-fixture"></div>
|
<div id="qunit-fixture"></div>
|
||||||
|
|
||||||
|
<!-- Setup fixture -->
|
||||||
|
<script type="text/javascript">
|
||||||
|
Mibew = {};
|
||||||
|
</script>
|
||||||
|
|
||||||
<!-- Start of the mibew_api.js tests -->
|
<!-- Start of the mibew_api.js tests -->
|
||||||
<script type="text/javascript" src="/webim/js/164/json2.js"></script>
|
<script type="text/javascript" src="/webim/js/libs/json2.js"></script>
|
||||||
<script type="text/javascript" src="/webim/js/164/mibewapi.js"></script>
|
<script type="text/javascript" src="/webim/js/compiled/mibewapi.js"></script>
|
||||||
<script type="text/javascript" src="test_cases/mibewapi_tests.js"></script>
|
<script type="text/javascript" src="test_cases/mibewapi_tests.js"></script>
|
||||||
<!-- End of the mibew_api.js tests -->
|
<!-- End of the mibew_api.js tests -->
|
||||||
|
|
||||||
<!-- Start of the PluginManager class tests -->
|
|
||||||
<script type="text/javascript" src="/webim/js/164/pluginmanager.js"></script>
|
|
||||||
<script type="text/javascript" src="test_cases/pluginmanager_tests.js"></script>
|
|
||||||
<!-- End of the mibew_api.js class tests -->
|
|
||||||
|
|
||||||
<!-- Start of Handlebars' helpers tests -->
|
<!-- Start of Handlebars' helpers tests -->
|
||||||
<script type="text/javascript" src="/webim/js/164/handlebars.js"></script>
|
<script type="text/javascript" src="/webim/js/libs/handlebars.js"></script>
|
||||||
<script type="text/javascript" src="/webim/js/164/handlebars_helpers.js"></script>
|
<script type="text/javascript" src="/webim/js/compiled/default/handlebars_helpers.js"></script>
|
||||||
<script type="text/javascript" src="test_cases/handlebars_helpers_tests.js"></script>
|
<script type="text/javascript" src="test_cases/handlebars_helpers_tests.js"></script>
|
||||||
<!-- Start of Handlebars' helpers tests -->
|
<!-- Start of Handlebars' helpers tests -->
|
||||||
</body>
|
</body>
|
||||||
|
@ -1,21 +0,0 @@
|
|||||||
// Testing PluginManager class
|
|
||||||
module('PluginManager');
|
|
||||||
|
|
||||||
test('getPlugin', function() {
|
|
||||||
var pluginManager = new PluginManager();
|
|
||||||
// Try to load not stored plugin
|
|
||||||
equal(
|
|
||||||
pluginManager.getPlugin('WrongPlugin'),
|
|
||||||
false,
|
|
||||||
'Test loading not stored plugin'
|
|
||||||
)
|
|
||||||
|
|
||||||
// Try save and load test plugin
|
|
||||||
var testPlugin = {'testField': 'testValue'}
|
|
||||||
pluginManager.addPlugin('TestPlugin', testPlugin);
|
|
||||||
deepEqual(
|
|
||||||
pluginManager.getPlugin('TestPlugin'),
|
|
||||||
testPlugin,
|
|
||||||
'Test loading stored plugin'
|
|
||||||
);
|
|
||||||
});
|
|
Loading…
Reference in New Issue
Block a user