Skip to content

Instantly share code, notes, and snippets.

@hsuh
Forked from stuartf7/qunit.teamcity.js
Last active June 4, 2018 08:02
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hsuh/8dbd9fb9518759cd81d3 to your computer and use it in GitHub Desktop.
Save hsuh/8dbd9fb9518759cd81d3 to your computer and use it in GitHub Desktop.
QUnit.begin(function(obj) {
console.log("Test amount:" + obj.totalTests);
});
QUnit.moduleStart(function (obj) {
console.log("##teamcity[testSuiteStarted name='" + obj.name + "']");
});
QUnit.moduleDone(function (obj) {
console.log("##teamcity[testSuiteFinished name='" + obj.name + "']");
});
QUnit.testStart(function (obj) {
console.log("##teamcity[testStarted name='" + obj.name + "']");
});
QUnit.testDone(function (obj) {
if (obj.failed > 0) {
console.log("##teamcity[testFailed name='" + obj.name + "'"
+ " message='Assertions failed: " + obj.failed + "'"
+ " details='Assertions failed: " + obj.failed + "']");
}
console.log("##teamcity[testFinished name='" + obj.name + "']");
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment