Created
April 29, 2012 20:33
-
-
Save rdingwall/2553096 to your computer and use it in GitHub Desktop.
Mocha.js TeamCity reporter async bug
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!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