Skip to content

armgit / mocha

Public Imported from GitHub
0

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

removed error context strings

Tj Holowaychuk78bbf86e62d7
diff --git a/lib/runner.js b/lib/runner.js
index f0631878..7e70a8b5 100644
--- a/lib/runner.js
+++ b/lib/runner.js
@@ -117,7 +117,6 @@ Runner.prototype.runTest = function(fn){
Runner.prototype.runTests = function(suite, fn){
var self = this
, tests = suite.tests
- , context
, test;
function next(err) {
@@ -125,7 +124,6 @@ Runner.prototype.runTests = function(suite, fn){
if (err) {
if (!test) throw err;
test.failed = true;
- if (context) test.title += ' ' + context;
self.emit('fail', test, err);
}
@@ -137,16 +135,13 @@ Runner.prototype.runTests = function(suite, fn){
// execute test and hook(s)
self.emit('test', self.test = test);
- context = 'in beforeEach hook';
self.hook('beforeEach', function(err){
- context = '';
if (err) return next(err);
self.runTest(function(err){
if (err) return next(err);
self.emit('pass', test);
test.passed = true;
self.emit('test end', test);
- context = 'in afterEach hook';
self.hook('afterEach', next);
});
});