@naturalcycles/dev-lib 13.22.0 → 13.23.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/dist/util/jest.util.js +4 -1
- package/package.json +1 -1
package/dist/util/jest.util.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.runJest = exports.isRunningAllTests = exports.getJestManualConfigPath = exports.getJestIntegrationConfigPath = exports.getJestConfigPath = void 0;
|
|
4
4
|
const fs = require("node:fs");
|
|
5
|
+
const os = require("node:os");
|
|
5
6
|
const js_lib_1 = require("@naturalcycles/js-lib");
|
|
6
7
|
const colors_1 = require("@naturalcycles/nodejs-lib/dist/colors");
|
|
7
8
|
const exec_1 = require("@naturalcycles/nodejs-lib/dist/exec");
|
|
@@ -102,7 +103,9 @@ async function runJest(opt = {}) {
|
|
|
102
103
|
if (!JEST_NO_ALPHABETIC) {
|
|
103
104
|
args.push(`--testSequencer=${paths_cnst_1.cfgDir}/jest.alphabetic.sequencer.js`);
|
|
104
105
|
}
|
|
105
|
-
|
|
106
|
+
const par = os.availableParallelism();
|
|
107
|
+
const cpus = os.cpus().length;
|
|
108
|
+
console.log(`${(0, colors_1.dimGrey)(`node ${node}, NODE_OPTIONS: ${NODE_OPTIONS}, cpus: ${cpus}, availableParallelism: ${par}`)}`);
|
|
106
109
|
if (JEST_SHARDS) {
|
|
107
110
|
const totalShards = Number(JEST_SHARDS);
|
|
108
111
|
const shards = (0, js_lib_1._range)(1, totalShards + 1);
|