Files
tubestation/browser/components/loop/test/standalone/index.html

93 lines
3.7 KiB
HTML

<!DOCTYPE html>
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<html>
<head>
<meta charset="utf-8">
<title>Loop mocha tests</title>
<link rel="stylesheet" media="all" href="../shared/vendor/mocha-2.2.5.css">
</head>
<body>
<div id="mocha">
<p><a href="../">Index</a></p>
<p><a href="../shared/">Shared Tests</a></p>
</div>
<div id="messages"></div>
<div id="fixtures"></div>
<script>
var uncaughtError;
window.addEventListener("error", function(error) {
uncaughtError = error;
});
var consoleWarn = console.warn;
var caughtWarnings = [];
console.warn = function() {
var args = Array.slice(arguments);
caughtWarnings.push(args);
consoleWarn.apply(console, args);
};
</script>
<!-- libs -->
<script src="../../content/shared/libs/react-0.12.2.js"></script>
<script src="../../content/shared/libs/lodash-3.9.3.js"></script>
<script src="../../content/shared/libs/backbone-1.2.1.js"></script>
<script src="../../standalone/content/libs/l10n-gaia-02ca67948fe8.js"></script>
<!-- test dependencies -->
<script src="../shared/vendor/mocha-2.2.5.js"></script>
<script src="../shared/vendor/chai-3.0.0.js"></script>
<script src="../shared/vendor/sinon-1.16.1.js"></script>
<script src="../shared/sdk_mock.js"></script>
<script>
chai.config.includeStack = true;
mocha.setup({ui: 'bdd', timeout: 10000});
</script>
<!-- App scripts -->
<script src="../../content/shared/js/utils.js"></script>
<script src="../../content/shared/js/mixins.js"></script>
<script src="../../content/shared/js/websocket.js"></script>
<script src="../../content/shared/js/actions.js"></script>
<script src="../../content/shared/js/validate.js"></script>
<script src="../../content/shared/js/dispatcher.js"></script>
<script src="../../content/shared/js/store.js"></script>
<script src="../../content/shared/js/roomStates.js"></script>
<script src="../../content/shared/js/activeRoomStore.js"></script>
<script src="../../content/shared/js/views.js"></script>
<script src="../../content/shared/js/textChatStore.js"></script>
<script src="../../content/shared/js/textChatView.js"></script>
<script src="../../content/shared/js/otSdkDriver.js"></script>
<script src="../../standalone/content/js/standaloneAppStore.js"></script>
<script src="../../standalone/content/js/standaloneMozLoop.js"></script>
<script src="../../standalone/content/js/standaloneRoomViews.js"></script>
<script src="../../standalone/content/js/standaloneMetricsStore.js"></script>
<script src="../../standalone/content/js/webapp.js"></script>
<!-- Test scripts -->
<script src="standaloneAppStore_test.js"></script>
<script src="standaloneMozLoop_test.js"></script>
<script src="standaloneRoomViews_test.js"></script>
<script src="standaloneMetricsStore_test.js"></script>
<script src="webapp_test.js"></script>
<script>
describe("Uncaught Error Check", function() {
it("should load the tests without errors", function() {
chai.expect(uncaughtError && uncaughtError.message).to.be.undefined;
});
});
describe("Unexpected Warnings Check", function() {
it("should log only the warnings we expect", function() {
chai.expect(caughtWarnings.length).to.eql(0);
});
});
mocha.run(function () {
var completeNode = document.createElement("p");
completeNode.setAttribute("id", "complete");
completeNode.appendChild(document.createTextNode("Complete"));
document.getElementById("mocha").appendChild(completeNode);
});
</script>
</body>
</html>