Skip to content

Instantly share code, notes, and snippets.

@rdingwall
Created April 29, 2012 20:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rdingwall/2553096 to your computer and use it in GitHub Desktop.
Save rdingwall/2553096 to your computer and use it in GitHub Desktop.
Mocha.js TeamCity reporter async bug
<!DOCTYPE html>
<html>
<head>
<!-- Mocha 1.0.2 at time of writing -->
<script type="text/javascript" src="https://raw.github.com/visionmedia/mocha/master/mocha.js"></script>
<link rel="stylesheet" type="text/css" href="https://raw.github.com/visionmedia/mocha/master/mocha.css" />
</head>
<script lang="text/javascript">
mocha.setup({
ui: "bdd",
//reporter: mocha.reporters.HTML // this works fine
reporter: mocha.reporters.Teamcity // this doesn't
});
onload = function () {
describe("Mocha async behaviour", function () {
it("should fail", function (done) {
setTimeout(function () {
throw "The other tests should still run!!";
done();
}, 100);
});
it("should pass", function (done) {
setTimeout(function() { done(); }, 1000);
});
});
mocha.run();
};
</script>
<body>
<div id="mocha" />
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment