Skip to content

armgit / mocha

Public Imported from GitHub
0

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

Revert "remove context() and specify()"

TJ Holowaychukc44cf13773ab
diff --git a/lib/interfaces/bdd.js b/lib/interfaces/bdd.js
index 6aeb6d6d..b5a6b93d 100644
--- a/lib/interfaces/bdd.js
+++ b/lib/interfaces/bdd.js
@@ -64,7 +64,7 @@ module.exports = function(suite){
* Pending describe.
*/
- context.xdescribe = function(title, fn){
+ context.xdescribe = context.xcontext = function(title, fn){
var suite = Suite.create(suites[0], title);
suite.pending = true;
suites.unshift(suite);
@@ -78,7 +78,7 @@ module.exports = function(suite){
* and/or tests.
*/
- context.describe = function(title, fn){
+ context.describe = context.context = function(title, fn){
var suite = Suite.create(suites[0], title);
suites.unshift(suite);
fn();
@@ -91,7 +91,7 @@ module.exports = function(suite){
* acting as a thunk.
*/
- context.it = function(title, fn){
+ context.it = context.specify = function(title, fn){
var suite = suites[0];
if (suite.pending) var fn = null;
suite.addTest(new Test(title, fn));
@@ -101,7 +101,7 @@ module.exports = function(suite){
* Pending test case.
*/
- context.xit = function(title){
+ context.xit = context.xspecify = function(title){
context.it(title);
};
});