Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: mochajs/mocha
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v2.4.4
Choose a base ref
...
head repository: mochajs/mocha
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v2.4.5
Choose a head ref
  • 6 commits
  • 14 files changed
  • 3 contributors

Commits on Jan 28, 2016

  1. Fix a number of assertions that weren't asserting anything

    They were missing parentheses and thus no assertion method was ever executed.
    mislav committed Jan 28, 2016

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    29a679b View commit details
  2. Merge pull request #2082 from mislav/fix-assertions

    Fix a number of assertions that weren't asserting anything
    danielstjules committed Jan 28, 2016

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    1fa6a79 View commit details
  3. Copy the full SHA
    0d1bb21 View commit details
  4. Copy the full SHA
    e1bf728 View commit details
  5. Copy the full SHA
    51c8ae4 View commit details
  6. Release v2.4.5

    boneskull committed Jan 28, 2016
    Copy the full SHA
    2a85944 View commit details
Showing with 153 additions and 229 deletions.
  1. +1 −0 .gitignore
  2. +9 −0 CHANGELOG.md
  3. +0 −37 lib/browser/chalk.js
  4. +20 −22 lib/reporters/base.js
  5. +3 −4 lib/reporters/landing.js
  6. +1 −2 lib/reporters/progress.js
  7. +96 −139 mocha.js
  8. +2 −4 package.json
  9. +2 −2 test/acceptance/utils.js
  10. +1 −1 test/grep.js
  11. +5 −5 test/runnable.js
  12. +2 −2 test/runner.js
  13. +9 −9 test/suite.js
  14. +2 −2 test/test.js
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -13,3 +13,4 @@ lib/browser/diff.js
*.iml
*.patch
*.diff
npm-debug.log*
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
2.4.5 / 2016-01-28
==================

* [#2080], [#2078], [#2072], [#2073], [#1200] - Revert changes to console colors in changeset [1192914](https://github.com/mochajs/mocha/commit/119291449cd03a11cdeda9e37cf718a69a012896) and subsequent related changes thereafter. Restores compatibility with IE8 & PhantomJS. See also [mantoni/mochify.js#129](https://github.com/mantoni/mochify.js/issues/129) and [openlayers/ol3#4746](https://github.com/openlayers/ol3/pull/4746) ([@boneskull])
* [#2082] - Fix several test assertions ([@mislav])

[#1200]: https://github.com/mochajs/mocha/issues/1200
[#2082]: https://github.com/mochajs/mocha/pull/2082

2.4.4 / 2016-01-27
==================

37 changes: 0 additions & 37 deletions lib/browser/chalk.js

This file was deleted.

42 changes: 20 additions & 22 deletions lib/reporters/base.js
Original file line number Diff line number Diff line change
@@ -7,8 +7,6 @@ var diff = require('diff');
var ms = require('../ms');
var utils = require('../utils');
var supportsColor = process.browser ? null : require('supports-color');
var chalk = require('chalk');
chalk.enabled = supportsColor;

/**
* Expose `Base`.
@@ -52,25 +50,25 @@ exports.inlineDiffs = false;
*/

exports.colors = {
pass: chalk.gray,
fail: chalk.red,
'bright pass': chalk.green.bold,
'bright fail': chalk.red.bold,
'bright yellow': chalk.yellow.bold,
pending: chalk.cyan,
suite: chalk.white,
'error title': chalk.gray,
'error message': chalk.red,
'error stack': chalk.white,
checkmark: chalk.green,
fast: chalk.gray,
medium: chalk.yellow,
slow: chalk.red,
green: chalk.green,
light: chalk.white.bold,
'diff gutter': chalk.gray,
'diff added': chalk.green,
'diff removed': chalk.red
pass: 90,
fail: 31,
'bright pass': 92,
'bright fail': 91,
'bright yellow': 93,
pending: 36,
suite: 0,
'error title': 0,
'error message': 31,
'error stack': 90,
checkmark: 32,
fast: 90,
medium: 33,
slow: 31,
green: 32,
light: 90,
'diff gutter': 90,
'diff added': 32,
'diff removed': 31
};

/**
@@ -105,7 +103,7 @@ var color = exports.color = function(type, str) {
if (!exports.useColors) {
return String(str);
}
return exports.colors[type](str);
return '\u001b[' + exports.colors[type] + 'm' + str + '\u001b[0m';
};

/**
7 changes: 3 additions & 4 deletions lib/reporters/landing.js
Original file line number Diff line number Diff line change
@@ -6,7 +6,6 @@ var Base = require('./base');
var inherits = require('../utils').inherits;
var cursor = Base.cursor;
var color = Base.color;
var chalk = require('chalk');

/**
* Expose `Landing`.
@@ -18,19 +17,19 @@ exports = module.exports = Landing;
* Airplane color.
*/

Base.colors.plane = chalk.white;
Base.colors.plane = 0;

/**
* Airplane crash color.
*/

Base.colors['plane crash'] = chalk.red;
Base.colors['plane crash'] = 31;

/**
* Runway color.
*/

Base.colors.runway = chalk.gray;
Base.colors.runway = 90;

/**
* Initialize a new `Landing` reporter.
3 changes: 1 addition & 2 deletions lib/reporters/progress.js
Original file line number Diff line number Diff line change
@@ -6,7 +6,6 @@ var Base = require('./base');
var inherits = require('../utils').inherits;
var color = Base.color;
var cursor = Base.cursor;
var chalk = require('chalk');

/**
* Expose `Progress`.
@@ -18,7 +17,7 @@ exports = module.exports = Progress;
* General progress bar color.
*/

Base.colors.progress = chalk.gray;
Base.colors.progress = 90;

/**
* Initialize a new `Progress` bar test reporter.
Loading