mocha 9.1.4 → 9.2.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/lib/nodejs/buffered-worker-pool.js +17 -1
- package/mocha-es2018.js +4 -12
- package/mocha.js +490 -297
- package/mocha.js.map +1 -1
- package/package.json +27 -28
|
@@ -75,7 +75,23 @@ class BufferedWorkerPool {
|
|
|
75
75
|
process.execArgv.join(' ')
|
|
76
76
|
);
|
|
77
77
|
|
|
78
|
-
|
|
78
|
+
let counter = 0;
|
|
79
|
+
const onCreateWorker = ({forkOpts}) => {
|
|
80
|
+
return {
|
|
81
|
+
forkOpts: {
|
|
82
|
+
...forkOpts,
|
|
83
|
+
// adds an incremental id to all workers, which can be useful to allocate resources for each process
|
|
84
|
+
env: {...process.env, MOCHA_WORKER_ID: counter++}
|
|
85
|
+
}
|
|
86
|
+
};
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
this.options = {
|
|
90
|
+
...WORKER_POOL_DEFAULT_OPTS,
|
|
91
|
+
...opts,
|
|
92
|
+
maxWorkers,
|
|
93
|
+
onCreateWorker
|
|
94
|
+
};
|
|
79
95
|
this._pool = workerpool.pool(WORKER_PATH, this.options);
|
|
80
96
|
}
|
|
81
97
|
|
package/mocha-es2018.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// mocha@9.
|
|
1
|
+
// mocha@9.2.0 in javascript ES2018
|
|
2
2
|
(function (global, factory) {
|
|
3
3
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
|
4
4
|
typeof define === 'function' && define.amd ? define(factory) :
|
|
@@ -9425,30 +9425,22 @@
|
|
|
9425
9425
|
|
|
9426
9426
|
var browser$2 = true;
|
|
9427
9427
|
|
|
9428
|
-
// This alphabet uses `A-Za-z0-9_-` symbols. The genetic algorithm helped
|
|
9429
|
-
// optimize the gzip compression for this alphabet.
|
|
9430
9428
|
let urlAlphabet =
|
|
9431
|
-
'
|
|
9432
|
-
|
|
9429
|
+
'useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict';
|
|
9433
9430
|
let customAlphabet = (alphabet, size) => {
|
|
9434
9431
|
return () => {
|
|
9435
9432
|
let id = '';
|
|
9436
|
-
// A compact alternative for `for (var i = 0; i < step; i++)`.
|
|
9437
9433
|
let i = size;
|
|
9438
9434
|
while (i--) {
|
|
9439
|
-
// `| 0` is more compact and faster than `Math.floor()`.
|
|
9440
9435
|
id += alphabet[(Math.random() * alphabet.length) | 0];
|
|
9441
9436
|
}
|
|
9442
9437
|
return id
|
|
9443
9438
|
}
|
|
9444
9439
|
};
|
|
9445
|
-
|
|
9446
9440
|
let nanoid = (size = 21) => {
|
|
9447
9441
|
let id = '';
|
|
9448
|
-
// A compact alternative for `for (var i = 0; i < step; i++)`.
|
|
9449
9442
|
let i = size;
|
|
9450
9443
|
while (i--) {
|
|
9451
|
-
// `| 0` is more compact and faster than `Math.floor()`.
|
|
9452
9444
|
id += urlAlphabet[(Math.random() * 64) | 0];
|
|
9453
9445
|
}
|
|
9454
9446
|
return id
|
|
@@ -10668,7 +10660,7 @@
|
|
|
10668
10660
|
|
|
10669
10661
|
/**
|
|
10670
10662
|
* Selects a color for a debug namespace
|
|
10671
|
-
* @param {String} namespace The namespace string for the
|
|
10663
|
+
* @param {String} namespace The namespace string for the debug instance to be colored
|
|
10672
10664
|
* @return {Number|String} An ANSI color code for the given namespace
|
|
10673
10665
|
* @api private
|
|
10674
10666
|
*/
|
|
@@ -17101,7 +17093,7 @@
|
|
|
17101
17093
|
});
|
|
17102
17094
|
|
|
17103
17095
|
var name = "mocha";
|
|
17104
|
-
var version = "9.
|
|
17096
|
+
var version = "9.2.0";
|
|
17105
17097
|
var homepage = "https://mochajs.org/";
|
|
17106
17098
|
var notifyLogo = "https://ibin.co/4QuRuGjXvl36.png";
|
|
17107
17099
|
var _package = {
|