mocha 2.4.1 → 2.4.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,39 @@
1
+ 2.4.5 / 2016-01-28
2
+ ==================
3
+
4
+ * [#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])
5
+ * [#2082] - Fix several test assertions ([@mislav])
6
+
7
+ [#1200]: https://github.com/mochajs/mocha/issues/1200
8
+ [#2082]: https://github.com/mochajs/mocha/pull/2082
9
+
10
+ 2.4.4 / 2016-01-27
11
+ ==================
12
+
13
+ * [#2080] - Fix broken RequireJS compatibility ([@boneskull])
14
+
15
+ [#2080]: https://github.com/mochajs/mocha/issues/2080
16
+
17
+ 2.4.3 / 2016-01-27
18
+ ==================
19
+
20
+ * [#2078] - Fix broken IE8 ([@boneskull])
21
+
22
+ [#2078]: https://github.com/mochajs/mocha/issues/2078
23
+
24
+ 2.4.2 / 2016-01-26
25
+ ==================
26
+
27
+ * [#2053] - Fix web worker compatibility ([@mislav])
28
+ * [#2072] - Fix Windows color output ([@thedark1337])
29
+ * [#2073] - Fix colors in `progress` and `landing` reporters ([@gyandeeps])
30
+
31
+ [#2053]: https://github.com/mochajs/mocha/pull/2053
32
+ [#2072]: https://github.com/mochajs/mocha/pull/2072
33
+ [#2073]: https://github.com/mochajs/mocha/pull/2073
34
+ [@gyandeeps]: https://github.com/gyandeeps
35
+ [@thedark1337]: https://github.com/thedark1337
36
+
1
37
  2.4.1 / 2016-01-26
2
38
  ==================
3
39
 
package/README.md CHANGED
@@ -6,6 +6,7 @@
6
6
 
7
7
  ## Links
8
8
 
9
+ - [Changelog](https://github.com/mochajs/mocha/blob/master/CHANGELOG.md)
9
10
  - [Google Group](http://groups.google.com/group/mochajs)
10
11
  - [Wiki](https://github.com/mochajs/mocha/wiki)
11
12
  - Mocha [Extensions and reporters](https://github.com/mochajs/mocha/wiki)
@@ -7,8 +7,6 @@ var diff = require('diff');
7
7
  var ms = require('../ms');
8
8
  var utils = require('../utils');
9
9
  var supportsColor = process.browser ? null : require('supports-color');
10
- var chalk = require('chalk');
11
- chalk.enabled = supportsColor;
12
10
 
13
11
  /**
14
12
  * Expose `Base`.
@@ -52,25 +50,25 @@ exports.inlineDiffs = false;
52
50
  */
53
51
 
54
52
  exports.colors = {
55
- pass: chalk.gray,
56
- fail: chalk.red,
57
- 'bright pass': chalk.green.bold,
58
- 'bright fail': chalk.red.bold,
59
- 'bright yellow': chalk.yellow.bold,
60
- pending: chalk.cyan,
61
- suite: chalk.white,
62
- 'error title': chalk.gray,
63
- 'error message': chalk.red,
64
- 'error stack': chalk.white,
65
- checkmark: chalk.green,
66
- fast: chalk.gray,
67
- medium: chalk.yellow,
68
- slow: chalk.red,
69
- green: chalk.green,
70
- light: chalk.white.bold,
71
- 'diff gutter': chalk.gray,
72
- 'diff added': chalk.green,
73
- 'diff removed': chalk.red
53
+ pass: 90,
54
+ fail: 31,
55
+ 'bright pass': 92,
56
+ 'bright fail': 91,
57
+ 'bright yellow': 93,
58
+ pending: 36,
59
+ suite: 0,
60
+ 'error title': 0,
61
+ 'error message': 31,
62
+ 'error stack': 90,
63
+ checkmark: 32,
64
+ fast: 90,
65
+ medium: 33,
66
+ slow: 31,
67
+ green: 32,
68
+ light: 90,
69
+ 'diff gutter': 90,
70
+ 'diff added': 32,
71
+ 'diff removed': 31
74
72
  };
75
73
 
76
74
  /**
@@ -105,7 +103,7 @@ var color = exports.color = function(type, str) {
105
103
  if (!exports.useColors) {
106
104
  return String(str);
107
105
  }
108
- return '\u001b[' + exports.colors[type](str) + '\u001b[0m';
106
+ return '\u001b[' + exports.colors[type] + 'm' + str + '\u001b[0m';
109
107
  };
110
108
 
111
109
  /**
package/mocha.js CHANGED
@@ -613,7 +613,7 @@ module.exports = function(suite) {
613
613
  });
614
614
  };
615
615
 
616
- },{"../suite":37,"../test":38,"./common":9,"escape-string-regexp":72}],9:[function(require,module,exports){
616
+ },{"../suite":37,"../test":38,"./common":9,"escape-string-regexp":68}],9:[function(require,module,exports){
617
617
  'use strict';
618
618
 
619
619
  /**
@@ -865,7 +865,7 @@ module.exports = function(suite) {
865
865
  });
866
866
  };
867
867
 
868
- },{"../suite":37,"../test":38,"./common":9,"escape-string-regexp":72}],13:[function(require,module,exports){
868
+ },{"../suite":37,"../test":38,"./common":9,"escape-string-regexp":68}],13:[function(require,module,exports){
869
869
  /**
870
870
  * Module dependencies.
871
871
  */
@@ -973,7 +973,7 @@ module.exports = function(suite) {
973
973
  });
974
974
  };
975
975
 
976
- },{"../suite":37,"../test":38,"./common":9,"escape-string-regexp":72}],14:[function(require,module,exports){
976
+ },{"../suite":37,"../test":38,"./common":9,"escape-string-regexp":68}],14:[function(require,module,exports){
977
977
  (function (process,global,__dirname){
978
978
  /*!
979
979
  * mocha
@@ -1479,7 +1479,7 @@ Mocha.prototype.run = function(fn) {
1479
1479
  };
1480
1480
 
1481
1481
  }).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {},"/lib")
1482
- },{"./context":6,"./hook":7,"./interfaces":11,"./reporters":22,"./runnable":35,"./runner":36,"./suite":37,"./test":38,"./utils":39,"_process":51,"escape-string-regexp":72,"growl":73,"path":41}],15:[function(require,module,exports){
1482
+ },{"./context":6,"./hook":7,"./interfaces":11,"./reporters":22,"./runnable":35,"./runner":36,"./suite":37,"./test":38,"./utils":39,"_process":51,"escape-string-regexp":68,"growl":69,"path":41}],15:[function(require,module,exports){
1483
1483
  /**
1484
1484
  * Helpers.
1485
1485
  */
@@ -1637,8 +1637,6 @@ var diff = require('diff');
1637
1637
  var ms = require('../ms');
1638
1638
  var utils = require('../utils');
1639
1639
  var supportsColor = process.browser ? null : require('supports-color');
1640
- var chalk = require('chalk');
1641
- chalk.enabled = supportsColor;
1642
1640
 
1643
1641
  /**
1644
1642
  * Expose `Base`.
@@ -1682,25 +1680,25 @@ exports.inlineDiffs = false;
1682
1680
  */
1683
1681
 
1684
1682
  exports.colors = {
1685
- pass: chalk.gray,
1686
- fail: chalk.red,
1687
- 'bright pass': chalk.green.bold,
1688
- 'bright fail': chalk.red.bold,
1689
- 'bright yellow': chalk.yellow.bold,
1690
- pending: chalk.cyan,
1691
- suite: chalk.white,
1692
- 'error title': chalk.gray,
1693
- 'error message': chalk.red,
1694
- 'error stack': chalk.white,
1695
- checkmark: chalk.green,
1696
- fast: chalk.gray,
1697
- medium: chalk.yellow,
1698
- slow: chalk.red,
1699
- green: chalk.green,
1700
- light: chalk.white.bold,
1701
- 'diff gutter': chalk.gray,
1702
- 'diff added': chalk.green,
1703
- 'diff removed': chalk.red
1683
+ pass: 90,
1684
+ fail: 31,
1685
+ 'bright pass': 92,
1686
+ 'bright fail': 91,
1687
+ 'bright yellow': 93,
1688
+ pending: 36,
1689
+ suite: 0,
1690
+ 'error title': 0,
1691
+ 'error message': 31,
1692
+ 'error stack': 90,
1693
+ checkmark: 32,
1694
+ fast: 90,
1695
+ medium: 33,
1696
+ slow: 31,
1697
+ green: 32,
1698
+ light: 90,
1699
+ 'diff gutter': 90,
1700
+ 'diff added': 32,
1701
+ 'diff removed': 31
1704
1702
  };
1705
1703
 
1706
1704
  /**
@@ -1735,7 +1733,7 @@ var color = exports.color = function(type, str) {
1735
1733
  if (!exports.useColors) {
1736
1734
  return String(str);
1737
1735
  }
1738
- return '\u001b[' + exports.colors[type](str) + '\u001b[0m';
1736
+ return '\u001b[' + exports.colors[type] + 'm' + str + '\u001b[0m';
1739
1737
  };
1740
1738
 
1741
1739
  /**
@@ -2119,7 +2117,7 @@ function sameType(a, b) {
2119
2117
  }
2120
2118
 
2121
2119
  }).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
2122
- },{"../ms":15,"../utils":39,"_process":51,"chalk":67,"diff":71,"supports-color":41,"tty":5}],18:[function(require,module,exports){
2120
+ },{"../ms":15,"../utils":39,"_process":51,"diff":67,"supports-color":41,"tty":5}],18:[function(require,module,exports){
2123
2121
  /**
2124
2122
  * Module dependencies.
2125
2123
  */
@@ -2646,7 +2644,7 @@ function on(el, event, fn) {
2646
2644
  }
2647
2645
 
2648
2646
  }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
2649
- },{"../browser/progress":4,"../utils":39,"./base":17,"escape-string-regexp":72}],22:[function(require,module,exports){
2647
+ },{"../browser/progress":4,"../utils":39,"./base":17,"escape-string-regexp":68}],22:[function(require,module,exports){
2650
2648
  // Alias exports to a their normalized format Mocha#reporter to prevent a need
2651
2649
  // for dynamic (try/catch) requires, which Browserify doesn't handle.
2652
2650
  exports.Base = exports.base = require('./base');
@@ -3973,7 +3971,7 @@ function cdata(str) {
3973
3971
  }
3974
3972
 
3975
3973
  }).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
3976
- },{"../utils":39,"./base":17,"_process":51,"fs":41,"mkdirp":74,"path":41}],35:[function(require,module,exports){
3974
+ },{"../utils":39,"./base":17,"_process":51,"fs":41,"mkdirp":70,"path":41}],35:[function(require,module,exports){
3977
3975
  (function (global){
3978
3976
  /**
3979
3977
  * Module dependencies.
@@ -11571,153 +11569,6 @@ function hasOwnProperty(obj, prop) {
11571
11569
 
11572
11570
  }).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
11573
11571
  },{"./support/isBuffer":65,"_process":51,"inherits":48}],67:[function(require,module,exports){
11574
- 'use strict';
11575
- var ansi = require('ansi-styles');
11576
- var stripAnsi = require('strip-ansi');
11577
- var hasColor = require('has-color');
11578
- var defineProps = Object.defineProperties;
11579
- var chalk = module.exports;
11580
-
11581
- var styles = (function () {
11582
- var ret = {};
11583
-
11584
- ansi.grey = ansi.gray;
11585
-
11586
- Object.keys(ansi).forEach(function (key) {
11587
- ret[key] = {
11588
- get: function () {
11589
- this._styles.push(key);
11590
- return this;
11591
- }
11592
- };
11593
- });
11594
-
11595
- return ret;
11596
- })();
11597
-
11598
- function init() {
11599
- var ret = {};
11600
-
11601
- Object.keys(styles).forEach(function (name) {
11602
- ret[name] = {
11603
- get: function () {
11604
- var obj = defineProps(function self() {
11605
- var str = [].slice.call(arguments).join(' ');
11606
-
11607
- if (!chalk.enabled) {
11608
- return str;
11609
- }
11610
-
11611
- return self._styles.reduce(function (str, name) {
11612
- var code = ansi[name];
11613
- return str ? code.open + str + code.close : '';
11614
- }, str);
11615
- }, styles);
11616
-
11617
- obj._styles = [];
11618
-
11619
- return obj[name];
11620
- }
11621
- }
11622
- });
11623
-
11624
- return ret;
11625
- }
11626
-
11627
- defineProps(chalk, init());
11628
-
11629
- chalk.styles = ansi;
11630
- chalk.stripColor = stripAnsi;
11631
- chalk.supportsColor = hasColor;
11632
-
11633
- // detect mode if not set manually
11634
- if (chalk.enabled === undefined) {
11635
- chalk.enabled = chalk.supportsColor;
11636
- }
11637
-
11638
- },{"ansi-styles":68,"has-color":69,"strip-ansi":70}],68:[function(require,module,exports){
11639
- 'use strict';
11640
- var styles = module.exports;
11641
-
11642
- var codes = {
11643
- reset: [0, 0],
11644
-
11645
- bold: [1, 22],
11646
- italic: [3, 23],
11647
- underline: [4, 24],
11648
- inverse: [7, 27],
11649
- strikethrough: [9, 29],
11650
-
11651
- black: [30, 39],
11652
- red: [31, 39],
11653
- green: [32, 39],
11654
- yellow: [33, 39],
11655
- blue: [34, 39],
11656
- magenta: [35, 39],
11657
- cyan: [36, 39],
11658
- white: [37, 39],
11659
- gray: [90, 39],
11660
-
11661
- bgBlack: [40, 49],
11662
- bgRed: [41, 49],
11663
- bgGreen: [42, 49],
11664
- bgYellow: [43, 49],
11665
- bgBlue: [44, 49],
11666
- bgMagenta: [45, 49],
11667
- bgCyan: [46, 49],
11668
- bgWhite: [47, 49]
11669
- };
11670
-
11671
- Object.keys(codes).forEach(function (key) {
11672
- var val = codes[key];
11673
- var style = styles[key] = {};
11674
- style.open = '\x1b[' + val[0] + 'm';
11675
- style.close = '\x1b[' + val[1] + 'm';
11676
- });
11677
-
11678
- },{}],69:[function(require,module,exports){
11679
- (function (process){
11680
- 'use strict';
11681
- module.exports = (function () {
11682
- if (process.argv.indexOf('--no-color') !== -1) {
11683
- return false;
11684
- }
11685
-
11686
- if (process.argv.indexOf('--color') !== -1) {
11687
- return true;
11688
- }
11689
-
11690
- if (process.stdout && !process.stdout.isTTY) {
11691
- return false;
11692
- }
11693
-
11694
- if (process.platform === 'win32') {
11695
- return true;
11696
- }
11697
-
11698
- if ('COLORTERM' in process.env) {
11699
- return true;
11700
- }
11701
-
11702
- if (process.env.TERM === 'dumb') {
11703
- return false;
11704
- }
11705
-
11706
- if (/^screen|^xterm|^vt100|color|ansi|cygwin|linux/i.test(process.env.TERM)) {
11707
- return true;
11708
- }
11709
-
11710
- return false;
11711
- })();
11712
-
11713
- }).call(this,require('_process'))
11714
- },{"_process":51}],70:[function(require,module,exports){
11715
- 'use strict';
11716
- module.exports = function (str) {
11717
- return typeof str === 'string' ? str.replace(/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]/g, '') : str;
11718
- };
11719
-
11720
- },{}],71:[function(require,module,exports){
11721
11572
  /* See LICENSE file for terms of use */
11722
11573
 
11723
11574
  /*
@@ -12338,7 +12189,7 @@ module.exports = function (str) {
12338
12189
  }
12339
12190
  }(this));
12340
12191
 
12341
- },{}],72:[function(require,module,exports){
12192
+ },{}],68:[function(require,module,exports){
12342
12193
  'use strict';
12343
12194
 
12344
12195
  var matchOperatorsRe = /[|\\{}()[\]^$+*?.]/g;
@@ -12351,7 +12202,7 @@ module.exports = function (str) {
12351
12202
  return str.replace(matchOperatorsRe, '\\$&');
12352
12203
  };
12353
12204
 
12354
- },{}],73:[function(require,module,exports){
12205
+ },{}],69:[function(require,module,exports){
12355
12206
  (function (process){
12356
12207
  // Growl - Copyright TJ Holowaychuk <tj@vision-media.ca> (MIT Licensed)
12357
12208
 
@@ -12589,7 +12440,7 @@ function growl(msg, options, fn) {
12589
12440
  };
12590
12441
 
12591
12442
  }).call(this,require('_process'))
12592
- },{"_process":51,"child_process":41,"fs":41,"os":50,"path":41}],74:[function(require,module,exports){
12443
+ },{"_process":51,"child_process":41,"fs":41,"os":50,"path":41}],70:[function(require,module,exports){
12593
12444
  (function (process){
12594
12445
  var path = require('path');
12595
12446
  var fs = require('fs');
@@ -12691,7 +12542,7 @@ mkdirP.sync = function sync (p, opts, made) {
12691
12542
  };
12692
12543
 
12693
12544
  }).call(this,require('_process'))
12694
- },{"_process":51,"fs":41,"path":41}],75:[function(require,module,exports){
12545
+ },{"_process":51,"fs":41,"path":41}],71:[function(require,module,exports){
12695
12546
  (function (process,global){
12696
12547
  /**
12697
12548
  * Shim process.stdout.
@@ -12852,8 +12703,8 @@ Mocha.process = process;
12852
12703
  * Expose mocha.
12853
12704
  */
12854
12705
 
12855
- window.Mocha = Mocha;
12856
- window.mocha = mocha;
12706
+ global.Mocha = Mocha;
12707
+ global.mocha = mocha;
12857
12708
 
12858
12709
  }).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
12859
- },{"../":1,"_process":51,"browser-stdout":40}]},{},[75]);
12710
+ },{"../":1,"_process":51,"browser-stdout":40}]},{},[71]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mocha",
3
- "version": "2.4.1",
3
+ "version": "2.4.5",
4
4
  "description": "simple, flexible, fun test framework",
5
5
  "keywords": [
6
6
  "mocha",
@@ -274,7 +274,6 @@
274
274
  "test": "make test-all"
275
275
  },
276
276
  "dependencies": {
277
- "chalk": "0.4.0",
278
277
  "commander": "2.3.0",
279
278
  "debug": "2.2.0",
280
279
  "diff": "1.4.0",