mocha-compat 3.5.4 → 3.6.0-0

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/README.md CHANGED
@@ -1,3 +1,5 @@
1
+
2
+
1
3
  # Mocha needs YOU!
2
4
 
3
5
  *Did you know* Mocha [is a dependency of over 100,000 projects](https://libraries.io/npm/mocha) published to npm alone?
@@ -116,7 +116,7 @@ program
116
116
  .option('--forbid-only', 'causes test marked with only to fail the suite')
117
117
  .option('--forbid-pending', 'causes pending tests and test marked with skip to fail the suite');
118
118
 
119
- program._name = 'mocha';
119
+ program._name = 'mocha-compat';
120
120
 
121
121
  // init command
122
122
 
@@ -4,13 +4,13 @@
4
4
 
5
5
  /**
6
6
  * This tiny wrapper file checks for known node flags and appends them
7
- * when found, before invoking the "real" _mocha(1) executable.
7
+ * when found, before invoking the "real" _mocha-compat(1) executable.
8
8
  */
9
9
 
10
10
  var spawn = require('child_process').spawn;
11
11
  var path = require('path');
12
12
  var getOptions = require('./options');
13
- var args = [path.join(__dirname, '_mocha')];
13
+ var args = [path.join(__dirname, '_mocha-compat')];
14
14
 
15
15
  // Load mocha.opts into process.argv
16
16
  // Must be loaded here to handle node-specific options
package/index.js CHANGED
@@ -1,3 +1,6 @@
1
1
  'use strict';
2
2
 
3
+ const mock = require('mock-require-lazy');
4
+ mock('glob', require('./vendor/glob/glob'));
5
+
3
6
  module.exports = require('./lib/mocha');
package/lib/mocha.js CHANGED
@@ -240,21 +240,21 @@ Mocha.prototype.loadFiles = function (fn) {
240
240
  * @api private
241
241
  */
242
242
  Mocha.prototype._growl = function (runner, reporter) {
243
- var notify = require('growl');
244
-
245
- runner.on('end', function () {
246
- var stats = reporter.stats;
247
- if (stats.failures) {
248
- var msg = stats.failures + ' of ' + runner.total + ' tests failed';
249
- notify(msg, { name: 'mocha', title: 'Failed', image: image('error') });
250
- } else {
251
- notify(stats.passes + ' tests passed in ' + stats.duration + 'ms', {
252
- name: 'mocha',
253
- title: 'Passed',
254
- image: image('ok')
255
- });
256
- }
257
- });
243
+ // var notify = require('growl');
244
+
245
+ // runner.on('end', function () {
246
+ // var stats = reporter.stats;
247
+ // if (stats.failures) {
248
+ // var msg = stats.failures + ' of ' + runner.total + ' tests failed';
249
+ // notify(msg, { name: 'mocha', title: 'Failed', image: image('error') });
250
+ // } else {
251
+ // notify(stats.passes + ' tests passed in ' + stats.duration + 'ms', {
252
+ // name: 'mocha',
253
+ // title: 'Passed',
254
+ // image: image('ok')
255
+ // });
256
+ // }
257
+ // });
258
258
  };
259
259
 
260
260
  /**