Skip to content

armgit / mocha

Public Imported from GitHub
0

☕️ Classic, reliable, trusted test framework for Node.js and the browser

console.warn the name and url of the teamcity reporter (#954)

Travis Jeffery1a4ab63f55b0
diff --git a/lib/mocha.js b/lib/mocha.js
index ebd26c18..23c70d39 100644
--- a/lib/mocha.js
+++ b/lib/mocha.js
@@ -114,6 +114,10 @@ Mocha.prototype.reporter = function(reporter){
var _reporter;
try { _reporter = require('./reporters/' + reporter); } catch (err) {};
if (!_reporter) try { _repoter = require(reporter); } catch (err) {};
+ if (!_reporter && reporter === 'teamcity')
+ console.warn('The Teamcity reporter was moved to a package named ' +
+ 'mocha-teamcity-reporter ' +
+ '(https://npmjs.org/package/mocha-teamcity-reporter).');
if (!_reporter) throw new Error('invalid reporter "' + reporter + '"');
this._reporter = _reporter;
}