Skip to content

armgit / mocha

Public Imported from GitHub
0

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

Fixed bdd ui styling

Tj Holowaychukbfae1e7fb801
diff --git a/lib/interfaces/bdd.js b/lib/interfaces/bdd.js
index 11dc777a..0d22fb5e 100644
--- a/lib/interfaces/bdd.js
+++ b/lib/interfaces/bdd.js
@@ -30,20 +30,21 @@ module.exports = function(suite){
/**
- * Do this before each example
- *
+ * Do this before each test case.
*/
+
context.beforeEach = function(fn){
suites[0].addSetup(fn);
};
/**
- * Do this after each example
- *
+ * Do this after each test case.
*/
+
context.afterEach = function(fn){
suites[0].addTearDown(fn);
};
+
/**
* Describe a "suite" with the given `title`
* and callback `fn` containing nested suites