☕️ Classic, reliable, trusted test framework for Node.js and the browser
jQuery. Closes #48
Tj Holowaychuk4e544a98ae61
diff --git a/mocha.js b/mocha.jsindex 7ce59dc4..a468a220 100644--- a/mocha.js+++ b/mocha.js@@ -317,7 +317,7 @@ module.exports = function(suite){* Execute before each test case.*/- context.tearDown = function(fn){+ context.teardown = function(fn){suites[0].afterEach(fn);};@@ -1389,7 +1389,7 @@ function TAP(runner) {, n = 1;runner.on('start', function(){- console.log(' %d..%d', 1, total);+ console.log('%d..%d', 1, total);});runner.on('test end', function(){@@ -1397,11 +1397,12 @@ function TAP(runner) {});runner.on('pass', function(test){- console.log(' ok %d %s', n, test.fullTitle());+ console.log('ok %d %s', n, test.fullTitle());});- runner.on('fail', function(test){- console.log(' not ok %d %s', n, test.fullTitle());+ runner.on('fail', function(test, err){+ console.log('not ok %d %s', n, test.fullTitle());+ console.log(err.stack.replace(/^/gm, ' '));});runner.on('end', function(){diff --git a/test/browser/index.html b/test/browser/index.htmlindex 594a421f..5fe1fe0e 100644--- a/test/browser/index.html+++ b/test/browser/index.html@@ -1,6 +1,7 @@<html><head><title>Mocha</title>+ <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.0/jquery.min.js" type="text/javascript"></script><script src="../../mocha.js"></script><link rel="stylesheet" href="style.css" /><script>