mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-11 10:08:41 +00:00
Bug 1064218 - Detect syntax failures in Loop's unit tests. r=nperriault
This commit is contained in:
parent
c8926c6aaf
commit
ddee53c551
@ -14,6 +14,13 @@
|
|||||||
</div>
|
</div>
|
||||||
<div id="messages"></div>
|
<div id="messages"></div>
|
||||||
<div id="fixtures"></div>
|
<div id="fixtures"></div>
|
||||||
|
<script>
|
||||||
|
var uncaughtError;
|
||||||
|
window.addEventListener("error", function(error) {
|
||||||
|
uncaughtError = error;
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
<!-- libs -->
|
<!-- libs -->
|
||||||
<script src="../../content/libs/l10n.js"></script>
|
<script src="../../content/libs/l10n.js"></script>
|
||||||
<script src="../../content/shared/libs/react-0.11.2.js"></script>
|
<script src="../../content/shared/libs/react-0.11.2.js"></script>
|
||||||
@ -68,6 +75,13 @@
|
|||||||
// Stop the default init functions running to avoid conflicts in tests
|
// Stop the default init functions running to avoid conflicts in tests
|
||||||
document.removeEventListener('DOMContentLoaded', loop.panel.init);
|
document.removeEventListener('DOMContentLoaded', loop.panel.init);
|
||||||
document.removeEventListener('DOMContentLoaded', loop.conversation.init);
|
document.removeEventListener('DOMContentLoaded', loop.conversation.init);
|
||||||
|
|
||||||
|
describe("Uncaught Error Check", function() {
|
||||||
|
it("should load the tests without errors", function() {
|
||||||
|
expect(uncaughtError && uncaughtError.message).to.be.undefined;
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
mocha.run(function () {
|
mocha.run(function () {
|
||||||
$("#mocha").append("<p id='complete'>Complete.</p>");
|
$("#mocha").append("<p id='complete'>Complete.</p>");
|
||||||
});
|
});
|
||||||
|
@ -14,6 +14,12 @@
|
|||||||
</div>
|
</div>
|
||||||
<div id="messages"></div>
|
<div id="messages"></div>
|
||||||
<div id="fixtures"></div>
|
<div id="fixtures"></div>
|
||||||
|
<script>
|
||||||
|
var uncaughtError;
|
||||||
|
window.addEventListener("error", function(error) {
|
||||||
|
uncaughtError = error;
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
<!-- libs -->
|
<!-- libs -->
|
||||||
<script src="../../content/shared/libs/react-0.11.2.js"></script>
|
<script src="../../content/shared/libs/react-0.11.2.js"></script>
|
||||||
@ -67,6 +73,12 @@
|
|||||||
<script src="store_test.js"></script>
|
<script src="store_test.js"></script>
|
||||||
<script src="roomStore_test.js"></script>
|
<script src="roomStore_test.js"></script>
|
||||||
<script>
|
<script>
|
||||||
|
describe("Uncaught Error Check", function() {
|
||||||
|
it("should load the tests without errors", function() {
|
||||||
|
expect(uncaughtError && uncaughtError.message).to.be.undefined;
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
mocha.run(function () {
|
mocha.run(function () {
|
||||||
$("#mocha").append("<p id='complete'>Complete.</p>");
|
$("#mocha").append("<p id='complete'>Complete.</p>");
|
||||||
});
|
});
|
||||||
|
@ -42,7 +42,9 @@ describe("loop.shared.models", function() {
|
|||||||
initPublisher: sandbox.spy(),
|
initPublisher: sandbox.spy(),
|
||||||
initSession: sandbox.stub().returns(fakeSession)
|
initSession: sandbox.stub().returns(fakeSession)
|
||||||
};
|
};
|
||||||
fakeMozLoop = {};
|
fakeMozLoop = {
|
||||||
|
addConversationContext: sinon.spy()
|
||||||
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
afterEach(function() {
|
afterEach(function() {
|
||||||
@ -63,7 +65,7 @@ describe("loop.shared.models", function() {
|
|||||||
|
|
||||||
beforeEach(function() {
|
beforeEach(function() {
|
||||||
conversation = new sharedModels.ConversationModel({}, {
|
conversation = new sharedModels.ConversationModel({}, {
|
||||||
sdk: fakeSDK
|
sdk: fakeSDK,
|
||||||
mozLoop: fakeMozLoop
|
mozLoop: fakeMozLoop
|
||||||
});
|
});
|
||||||
conversation.set("loopToken", "fakeToken");
|
conversation.set("loopToken", "fakeToken");
|
||||||
|
@ -15,6 +15,13 @@
|
|||||||
</div>
|
</div>
|
||||||
<div id="messages"></div>
|
<div id="messages"></div>
|
||||||
<div id="fixtures"></div>
|
<div id="fixtures"></div>
|
||||||
|
<script>
|
||||||
|
var uncaughtError;
|
||||||
|
window.addEventListener("error", function(error) {
|
||||||
|
uncaughtError = error;
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
<!-- libs -->
|
<!-- libs -->
|
||||||
<script src="../../content/shared/libs/react-0.11.2.js"></script>
|
<script src="../../content/shared/libs/react-0.11.2.js"></script>
|
||||||
<script src="../../content/shared/libs/jquery-2.1.0.js"></script>
|
<script src="../../content/shared/libs/jquery-2.1.0.js"></script>
|
||||||
@ -59,6 +66,12 @@
|
|||||||
<script src="webapp_test.js"></script>
|
<script src="webapp_test.js"></script>
|
||||||
<script src="multiplexGum_test.js"></script>
|
<script src="multiplexGum_test.js"></script>
|
||||||
<script>
|
<script>
|
||||||
|
describe("Uncaught Error Check", function() {
|
||||||
|
it("should load the tests without errors", function() {
|
||||||
|
expect(uncaughtError && uncaughtError.message).to.be.undefined;
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
mocha.run(function () {
|
mocha.run(function () {
|
||||||
$("#mocha").append("<p id='complete'>Complete.</p>");
|
$("#mocha").append("<p id='complete'>Complete.</p>");
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user