mocha-compat 3.6.1 → 3.6.3

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/bin/_mocha-compat CHANGED
@@ -427,10 +427,10 @@ if (program.watch) {
427
427
  process.exit(130);
428
428
  });
429
429
 
430
- var watchFiles = utils.files(cwd, [ 'js' ].concat(program.watchExtensions));
430
+ var watchFiles = utils.files(cwd, ['js'].concat(program.watchExtensions));
431
431
  var runAgain = false;
432
432
 
433
- loadAndRun = function loadAndRun () {
433
+ loadAndRun = function loadAndRun() {
434
434
  try {
435
435
  mocha.files = files;
436
436
  runAgain = false;
@@ -445,7 +445,7 @@ if (program.watch) {
445
445
  }
446
446
  };
447
447
 
448
- purge = function purge () {
448
+ purge = function purge() {
449
449
  watchFiles.forEach(function (file) {
450
450
  delete require.cache[file];
451
451
  });
@@ -453,7 +453,7 @@ if (program.watch) {
453
453
 
454
454
  loadAndRun();
455
455
 
456
- rerun = function rerun () {
456
+ rerun = function rerun() {
457
457
  purge();
458
458
  stop();
459
459
  if (!program.grep) {
@@ -474,19 +474,19 @@ if (program.watch) {
474
474
  }
475
475
  });
476
476
  } else {
477
- // load
477
+ // load
478
478
 
479
479
  mocha.files = files;
480
480
  runner = mocha.run(program.exit ? exit : exitLater);
481
481
  }
482
482
 
483
- function exitLater (code) {
483
+ function exitLater(code) {
484
484
  process.on('exit', function () {
485
485
  process.exit(Math.min(code, 255));
486
486
  });
487
487
  }
488
488
 
489
- function exit (code) {
489
+ function exit(code) {
490
490
  var clampedCode = Math.min(code, 255);
491
491
 
492
492
  // Eagerly set the process's exit code in case stream.write doesn't
@@ -496,7 +496,7 @@ function exit (code) {
496
496
  // flush output for Node.js Windows pipe bug
497
497
  // https://github.com/joyent/node/issues/6247 is just one bug example
498
498
  // https://github.com/visionmedia/mocha/issues/333 has a good discussion
499
- function done () {
499
+ function done() {
500
500
  if (!(draining--)) {
501
501
  process.exit(clampedCode);
502
502
  }
@@ -527,7 +527,7 @@ process.on('SIGINT', function () {
527
527
  * Parse list.
528
528
  */
529
529
 
530
- function list (str) {
530
+ function list(str) {
531
531
  return str.split(/ *, */);
532
532
  }
533
533
 
@@ -535,7 +535,7 @@ function list (str) {
535
535
  * Hide the cursor.
536
536
  */
537
537
 
538
- function hideCursor () {
538
+ function hideCursor() {
539
539
  process.stdout.write('\u001b[?25l');
540
540
  }
541
541
 
@@ -543,7 +543,7 @@ function hideCursor () {
543
543
  * Show the cursor.
544
544
  */
545
545
 
546
- function showCursor () {
546
+ function showCursor() {
547
547
  process.stdout.write('\u001b[?25h');
548
548
  }
549
549
 
@@ -551,7 +551,7 @@ function showCursor () {
551
551
  * Stop play()ing.
552
552
  */
553
553
 
554
- function stop () {
554
+ function stop() {
555
555
  process.stdout.write('\u001b[2K');
556
556
  clearInterval(play.timer);
557
557
  }
@@ -560,7 +560,7 @@ function stop () {
560
560
  * Play the given array of strings.
561
561
  */
562
562
 
563
- function play (arr, interval) {
563
+ function play(arr, interval) {
564
564
  var len = arr.length;
565
565
  interval = interval || 100;
566
566
  var i = 0;
package/index.js CHANGED
@@ -1,6 +1,3 @@
1
1
  'use strict';
2
2
 
3
- var mock = require('mock-require-lazy');
4
- mock('glob', require('./vendor/glob/glob'));
5
-
6
3
  module.exports = require('./lib/mocha');
package/lib/utils.js CHANGED
@@ -10,7 +10,7 @@ var JSON = require('json3');
10
10
  var basename = require('path').basename;
11
11
  var debug = require('debug')('mocha:watch');
12
12
  var exists = require('fs').existsSync || require('path').existsSync;
13
- var glob = require('glob');
13
+ var glob = require('../vendor/glob/glob.js');
14
14
  var path = require('path');
15
15
  var join = path.join;
16
16
  var readdirSync = require('fs').readdirSync;
package/mocha.js CHANGED
@@ -6005,7 +6005,7 @@ var JSON = require('json3');
6005
6005
  var basename = require('path').basename;
6006
6006
  var debug = require('debug')('mocha:watch');
6007
6007
  var exists = require('fs').existsSync || require('path').existsSync;
6008
- var glob = require('glob');
6008
+ var glob = require('./vendor/glob/glob.js');
6009
6009
  var path = require('path');
6010
6010
  var join = path.join;
6011
6011
  var readdirSync = require('fs').readdirSync;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mocha-compat",
3
- "version": "3.6.1",
3
+ "version": "3.6.3",
4
4
  "description": "This is a fork of mocha 3.5.3 to upgrade dependencies to retain support for Node >=0.8 and resolve npm audit issues. Replace mocha-compat wherever you use mocha so they can be used side by side",
5
5
  "keywords": [
6
6
  "mocha",
@@ -318,9 +318,9 @@
318
318
  "lodash.create": "^3.1.1",
319
319
  "minimatch": "^3.1.2",
320
320
  "mkdirp": "^0.5.5",
321
- "mock-require-lazy": "^1.0.1",
322
321
  "once": "^1.3.0",
323
- "supports-color": "^3.1.2"
322
+ "supports-color": "^3.1.2",
323
+ "wrappy": "^1.0.2"
324
324
  },
325
325
  "devDependencies": {
326
326
  "@coderbyheart/karma-sauce-launcher": "git://github.com/coderbyheart/karma-sauce-launcher#5259942cd6d40090eaa13ceeef5b0b8738c7710f",
@@ -18,17 +18,17 @@
18
18
  },
19
19
  "dependencies": {
20
20
  "fs.realpath": "^1.0.0",
21
- "inflight": "^1.0.4",
21
+ "inflight": "^1.0.6",
22
22
  "inherits": "2",
23
- "minimatch": "^5.0.1",
24
- "once": "^1.3.0"
23
+ "minimatch": "^10.0.3",
24
+ "once": "^1.4.0"
25
25
  },
26
26
  "devDependencies": {
27
- "memfs": "^3.2.0",
28
- "mkdirp": "0",
29
- "rimraf": "^2.2.8",
30
- "tap": "^16.0.1",
31
- "tick": "0.0.6"
27
+ "memfs": "^4.17.2",
28
+ "mkdirp": "3",
29
+ "rimraf": "^6.0.1",
30
+ "tap": "^21.1.0",
31
+ "tick": "0.1.1"
32
32
  },
33
33
  "tap": {
34
34
  "before": "test/00-setup.js",
@@ -7,11 +7,11 @@
7
7
  "inflight.js"
8
8
  ],
9
9
  "dependencies": {
10
- "once": "^1.3.0",
10
+ "once": "^1.4.0",
11
11
  "wrappy": "1"
12
12
  },
13
13
  "devDependencies": {
14
- "tap": "^7.1.2"
14
+ "tap": "^21.1.0"
15
15
  },
16
16
  "scripts": {
17
17
  "test": "tap test.js --100"