Skip to content

Commit

Permalink
1.17.0
Browse files Browse the repository at this point in the history
  • Loading branch information
travisjeffery committed Jan 9, 2014
1 parent 68ae2d8 commit ffaa38d
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 4 deletions.
11 changes: 11 additions & 0 deletions History.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
1.17.0 / 2014-01-09
==================

* add: able to require globals (describe, it, etc.) through mocha (#1077)
* fix: abort previous run on --watch change (#1100)
* fix: reset context for each --watch triggered run (#1099)
* fix: error when cli can't resolve path or pattern (#799)
* fix: canonicalize objects before stringifying and diffing them (#1079)
* fix: make CR call behave like carriage return for non tty (#1087)


1.16.2 / 2013-12-23
==================

Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mocha",
"version": "1.16.2",
"version": "1.17.0",
"main": "mocha.js",
"ignore": [
"bin",
Expand Down
2 changes: 1 addition & 1 deletion component.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mocha",
"version": "1.16.2",
"version": "1.17.0",
"repo": "visionmedia/mocha",
"description": "simple, flexible, fun test framework",
"keywords": [
Expand Down
17 changes: 16 additions & 1 deletion mocha.js
Original file line number Diff line number Diff line change
Expand Up @@ -1437,6 +1437,21 @@ function Mocha(options) {
if (null != options.timeout) this.timeout(options.timeout);
this.useColors(options.useColors)
if (options.slow) this.slow(options.slow);

this.suite.on('pre-require', function (context) {
exports.afterEach = context.afterEach || context.teardown;
exports.after = context.after || context.suiteTeardown;
exports.beforeEach = context.beforeEach || context.setup;
exports.before = context.before || context.suiteSetup;
exports.describe = context.describe || context.suite;
exports.it = context.it || context.test;
exports.setup = context.setup || context.beforeEach;
exports.suiteSetup = context.suiteSetup || context.before;
exports.suiteTeardown = context.suiteTeardown || context.after;
exports.suite = context.suite || context.describe;
exports.teardown = context.teardown || context.afterEach;
exports.test = context.test || context.it;
});
}

/**
Expand Down Expand Up @@ -1977,7 +1992,7 @@ exports.cursor = {
exports.cursor.deleteLine();
exports.cursor.beginningOfLine();
} else {
process.stdout.write('\n');
process.stdout.write('\r');
}
}
};
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mocha",
"version": "1.16.2",
"version": "1.17.0",
"description": "simple, flexible, fun test framework",
"keywords": [
"mocha",
Expand Down

0 comments on commit ffaa38d

Please sign in to comment.