mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-06 06:22:33 +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 id="messages"></div>
|
||||
<div id="fixtures"></div>
|
||||
<script>
|
||||
var uncaughtError;
|
||||
window.addEventListener("error", function(error) {
|
||||
uncaughtError = error;
|
||||
});
|
||||
</script>
|
||||
|
||||
<!-- libs -->
|
||||
<script src="../../content/libs/l10n.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
|
||||
document.removeEventListener('DOMContentLoaded', loop.panel.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").append("<p id='complete'>Complete.</p>");
|
||||
});
|
||||
|
@ -14,6 +14,12 @@
|
||||
</div>
|
||||
<div id="messages"></div>
|
||||
<div id="fixtures"></div>
|
||||
<script>
|
||||
var uncaughtError;
|
||||
window.addEventListener("error", function(error) {
|
||||
uncaughtError = error;
|
||||
});
|
||||
</script>
|
||||
|
||||
<!-- libs -->
|
||||
<script src="../../content/shared/libs/react-0.11.2.js"></script>
|
||||
@ -67,6 +73,12 @@
|
||||
<script src="store_test.js"></script>
|
||||
<script src="roomStore_test.js"></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").append("<p id='complete'>Complete.</p>");
|
||||
});
|
||||
|
@ -42,7 +42,9 @@ describe("loop.shared.models", function() {
|
||||
initPublisher: sandbox.spy(),
|
||||
initSession: sandbox.stub().returns(fakeSession)
|
||||
};
|
||||
fakeMozLoop = {};
|
||||
fakeMozLoop = {
|
||||
addConversationContext: sinon.spy()
|
||||
};
|
||||
});
|
||||
|
||||
afterEach(function() {
|
||||
@ -63,7 +65,7 @@ describe("loop.shared.models", function() {
|
||||
|
||||
beforeEach(function() {
|
||||
conversation = new sharedModels.ConversationModel({}, {
|
||||
sdk: fakeSDK
|
||||
sdk: fakeSDK,
|
||||
mozLoop: fakeMozLoop
|
||||
});
|
||||
conversation.set("loopToken", "fakeToken");
|
||||
|
@ -15,6 +15,13 @@
|
||||
</div>
|
||||
<div id="messages"></div>
|
||||
<div id="fixtures"></div>
|
||||
<script>
|
||||
var uncaughtError;
|
||||
window.addEventListener("error", function(error) {
|
||||
uncaughtError = error;
|
||||
});
|
||||
</script>
|
||||
|
||||
<!-- libs -->
|
||||
<script src="../../content/shared/libs/react-0.11.2.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="multiplexGum_test.js"></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").append("<p id='complete'>Complete.</p>");
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user