@nx/jest 16.0.0-beta.1
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 +8 -0
- package/LICENSE +22 -0
- package/README.md +63 -0
- package/executors.json +17 -0
- package/generators.json +34 -0
- package/index.d.ts +5 -0
- package/index.js +16 -0
- package/index.js.map +1 -0
- package/migrations.json +275 -0
- package/package.json +57 -0
- package/plugins/resolver.d.ts +1 -0
- package/plugins/resolver.js +56 -0
- package/plugins/resolver.js.map +1 -0
- package/preset/index.d.ts +2 -0
- package/preset/index.js +5 -0
- package/preset/index.js.map +1 -0
- package/preset/jest-preset.d.ts +2 -0
- package/preset/jest-preset.js +34 -0
- package/preset/jest-preset.js.map +1 -0
- package/src/executors/jest/compat.d.ts +2 -0
- package/src/executors/jest/compat.js +6 -0
- package/src/executors/jest/compat.js.map +1 -0
- package/src/executors/jest/jest.impl.d.ts +11 -0
- package/src/executors/jest/jest.impl.js +153 -0
- package/src/executors/jest/jest.impl.js.map +1 -0
- package/src/executors/jest/schema.d.ts +42 -0
- package/src/executors/jest/schema.json +218 -0
- package/src/executors/jest/summary.d.ts +7 -0
- package/src/executors/jest/summary.js +155 -0
- package/src/executors/jest/summary.js.map +1 -0
- package/src/generators/init/init.d.ts +5 -0
- package/src/generators/init/init.js +169 -0
- package/src/generators/init/init.js.map +1 -0
- package/src/generators/init/schema.d.ts +11 -0
- package/src/generators/init/schema.json +42 -0
- package/src/generators/jest-project/files/jest.config.ts__tmpl__ +16 -0
- package/src/generators/jest-project/files/src/test-setup.ts__tmpl__ +0 -0
- package/src/generators/jest-project/files/tsconfig.spec.json__tmpl__ +21 -0
- package/src/generators/jest-project/files-angular/jest.config.ts__tmpl__ +27 -0
- package/src/generators/jest-project/files-angular/src/test-setup.ts__tmpl__ +1 -0
- package/src/generators/jest-project/files-angular/tsconfig.spec.json__tmpl__ +22 -0
- package/src/generators/jest-project/jest-project.d.ts +4 -0
- package/src/generators/jest-project/jest-project.js +55 -0
- package/src/generators/jest-project/jest-project.js.map +1 -0
- package/src/generators/jest-project/lib/check-for-test-target.d.ts +3 -0
- package/src/generators/jest-project/lib/check-for-test-target.js +13 -0
- package/src/generators/jest-project/lib/check-for-test-target.js.map +1 -0
- package/src/generators/jest-project/lib/create-files.d.ts +3 -0
- package/src/generators/jest-project/lib/create-files.js +44 -0
- package/src/generators/jest-project/lib/create-files.js.map +1 -0
- package/src/generators/jest-project/lib/update-jestconfig.d.ts +3 -0
- package/src/generators/jest-project/lib/update-jestconfig.js +22 -0
- package/src/generators/jest-project/lib/update-jestconfig.js.map +1 -0
- package/src/generators/jest-project/lib/update-tsconfig.d.ts +3 -0
- package/src/generators/jest-project/lib/update-tsconfig.js +22 -0
- package/src/generators/jest-project/lib/update-tsconfig.js.map +1 -0
- package/src/generators/jest-project/lib/update-workspace.d.ts +3 -0
- package/src/generators/jest-project/lib/update-workspace.js +37 -0
- package/src/generators/jest-project/lib/update-workspace.js.map +1 -0
- package/src/generators/jest-project/schema.d.ts +23 -0
- package/src/generators/jest-project/schema.json +80 -0
- package/src/migrations/update-12-1-2/update-jest-preset-angular.d.ts +1 -0
- package/src/migrations/update-12-1-2/update-jest-preset-angular.js +55 -0
- package/src/migrations/update-12-1-2/update-jest-preset-angular.js.map +1 -0
- package/src/migrations/update-12-1-2/update-ts-jest.d.ts +2 -0
- package/src/migrations/update-12-1-2/update-ts-jest.js +36 -0
- package/src/migrations/update-12-1-2/update-ts-jest.js.map +1 -0
- package/src/migrations/update-12-4-0/add-test-environment-for-node.d.ts +2 -0
- package/src/migrations/update-12-4-0/add-test-environment-for-node.js +38 -0
- package/src/migrations/update-12-4-0/add-test-environment-for-node.js.map +1 -0
- package/src/migrations/update-12-4-0/update-jest-preset-angular.d.ts +25 -0
- package/src/migrations/update-12-4-0/update-jest-preset-angular.js +89 -0
- package/src/migrations/update-12-4-0/update-jest-preset-angular.js.map +1 -0
- package/src/migrations/update-12-6-0/update-base-jest-config.d.ts +2 -0
- package/src/migrations/update-12-6-0/update-base-jest-config.js +43 -0
- package/src/migrations/update-12-6-0/update-base-jest-config.js.map +1 -0
- package/src/migrations/update-13-1-2/update-tsconfigs-for-tests.d.ts +2 -0
- package/src/migrations/update-13-1-2/update-tsconfigs-for-tests.js +60 -0
- package/src/migrations/update-13-1-2/update-tsconfigs-for-tests.js.map +1 -0
- package/src/migrations/update-13-4-4/add-missing-root-babel-config.d.ts +2 -0
- package/src/migrations/update-13-4-4/add-missing-root-babel-config.js +43 -0
- package/src/migrations/update-13-4-4/add-missing-root-babel-config.js.map +1 -0
- package/src/migrations/update-14-0-0/update-jest-config-ext.d.ts +3 -0
- package/src/migrations/update-14-0-0/update-jest-config-ext.js +115 -0
- package/src/migrations/update-14-0-0/update-jest-config-ext.js.map +1 -0
- package/src/migrations/update-14-1-5/update-exports-jest-config.d.ts +7 -0
- package/src/migrations/update-14-1-5/update-exports-jest-config.js +66 -0
- package/src/migrations/update-14-1-5/update-exports-jest-config.js.map +1 -0
- package/src/migrations/update-14-6-0/update-configs-jest-28.d.ts +5 -0
- package/src/migrations/update-14-6-0/update-configs-jest-28.js +82 -0
- package/src/migrations/update-14-6-0/update-configs-jest-28.js.map +1 -0
- package/src/migrations/update-14-6-0/update-tests-jest-28.d.ts +24 -0
- package/src/migrations/update-14-6-0/update-tests-jest-28.js +158 -0
- package/src/migrations/update-14-6-0/update-tests-jest-28.js.map +1 -0
- package/src/migrations/update-15-0-0/add-jest-inputs.d.ts +2 -0
- package/src/migrations/update-15-0-0/add-jest-inputs.js +47 -0
- package/src/migrations/update-15-0-0/add-jest-inputs.js.map +1 -0
- package/src/migrations/update-15-8-0/update-configs-jest-29.d.ts +3 -0
- package/src/migrations/update-15-8-0/update-configs-jest-29.js +153 -0
- package/src/migrations/update-15-8-0/update-configs-jest-29.js.map +1 -0
- package/src/migrations/update-15-8-0/update-tests-jest-29.d.ts +5 -0
- package/src/migrations/update-15-8-0/update-tests-jest-29.js +64 -0
- package/src/migrations/update-15-8-0/update-tests-jest-29.js.map +1 -0
- package/src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages.d.ts +2 -0
- package/src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages.js +13 -0
- package/src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages.js.map +1 -0
- package/src/utils/ast-utils.d.ts +9 -0
- package/src/utils/ast-utils.js +33 -0
- package/src/utils/ast-utils.js.map +1 -0
- package/src/utils/config/find-root-jest-files.d.ts +3 -0
- package/src/utils/config/find-root-jest-files.js +21 -0
- package/src/utils/config/find-root-jest-files.js.map +1 -0
- package/src/utils/config/functions.d.ts +17 -0
- package/src/utils/config/functions.js +214 -0
- package/src/utils/config/functions.js.map +1 -0
- package/src/utils/config/get-jest-projects.d.ts +19 -0
- package/src/utils/config/get-jest-projects.js +64 -0
- package/src/utils/config/get-jest-projects.js.map +1 -0
- package/src/utils/config/update-config.d.ts +20 -0
- package/src/utils/config/update-config.js +84 -0
- package/src/utils/config/update-config.js.map +1 -0
- package/src/utils/versions.d.ts +9 -0
- package/src/utils/versions.js +13 -0
- package/src/utils/versions.js.map +1 -0
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import 'dotenv/config';
|
|
2
|
+
import { JestExecutorOptions } from './schema';
|
|
3
|
+
import { Config } from '@jest/types';
|
|
4
|
+
import { ExecutorContext, TaskGraph } from '@nx/devkit';
|
|
5
|
+
import type { BatchResults } from 'nx/src/tasks-runner/batch/batch-messages';
|
|
6
|
+
export declare function jestExecutor(options: JestExecutorOptions, context: ExecutorContext): Promise<{
|
|
7
|
+
success: boolean;
|
|
8
|
+
}>;
|
|
9
|
+
export declare function jestConfigParser(options: JestExecutorOptions, context: ExecutorContext, multiProjects?: boolean): Promise<Config.Argv>;
|
|
10
|
+
export default jestExecutor;
|
|
11
|
+
export declare function batchJest(taskGraph: TaskGraph, inputs: Record<string, JestExecutorOptions>, overrides: JestExecutorOptions, context: ExecutorContext): Promise<BatchResults>;
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var _a;
|
|
3
|
+
var _b;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.batchJest = exports.jestConfigParser = exports.jestExecutor = void 0;
|
|
6
|
+
const tslib_1 = require("tslib");
|
|
7
|
+
require("dotenv/config");
|
|
8
|
+
const jest_1 = require("jest");
|
|
9
|
+
const jest_config_1 = require("jest-config");
|
|
10
|
+
const reporters_1 = require("@jest/reporters");
|
|
11
|
+
const test_result_1 = require("@jest/test-result");
|
|
12
|
+
const path = require("path");
|
|
13
|
+
const path_1 = require("path");
|
|
14
|
+
const devkit_1 = require("@nx/devkit");
|
|
15
|
+
const summary_1 = require("./summary");
|
|
16
|
+
const fs_1 = require("fs");
|
|
17
|
+
(_a = (_b = process.env).NODE_ENV) !== null && _a !== void 0 ? _a : (_b.NODE_ENV = 'test');
|
|
18
|
+
function jestExecutor(options, context) {
|
|
19
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
20
|
+
const config = yield jestConfigParser(options, context);
|
|
21
|
+
const { results } = yield (0, jest_1.runCLI)(config, [options.jestConfig]);
|
|
22
|
+
return { success: results.success };
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
exports.jestExecutor = jestExecutor;
|
|
26
|
+
function getExtraArgs(options, schema) {
|
|
27
|
+
const extraArgs = {};
|
|
28
|
+
for (const key of Object.keys(options)) {
|
|
29
|
+
if (!schema.properties[key]) {
|
|
30
|
+
extraArgs[key] = options[key];
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
return extraArgs;
|
|
34
|
+
}
|
|
35
|
+
function jestConfigParser(options, context, multiProjects = false) {
|
|
36
|
+
var _a;
|
|
37
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
38
|
+
let jestConfig;
|
|
39
|
+
// support passing extra args to jest cli supporting 3rd party plugins
|
|
40
|
+
// like 'jest-runner-groups' --group arg
|
|
41
|
+
const schema = yield Promise.resolve().then(() => require('./schema.json'));
|
|
42
|
+
const extraArgs = getExtraArgs(options, schema);
|
|
43
|
+
const config = Object.assign(Object.assign({}, extraArgs), { $0: undefined, _: [], config: options.config, coverage: options.codeCoverage, bail: options.bail, ci: options.ci, color: options.color, detectOpenHandles: options.detectOpenHandles, logHeapUsage: options.logHeapUsage, detectLeaks: options.detectLeaks, json: options.json, maxWorkers: options.maxWorkers, onlyChanged: options.onlyChanged, changedSince: options.changedSince, outputFile: options.outputFile, passWithNoTests: options.passWithNoTests, runInBand: options.runInBand, showConfig: options.showConfig, silent: options.silent, testLocationInResults: options.testLocationInResults, testNamePattern: options.testNamePattern, testPathPattern: options.testPathPattern, testPathIgnorePatterns: options.testPathIgnorePatterns, testTimeout: options.testTimeout, colors: options.colors, verbose: options.verbose, testResultsProcessor: options.testResultsProcessor, updateSnapshot: options.updateSnapshot, useStderr: options.useStderr, watch: options.watch, watchAll: options.watchAll });
|
|
44
|
+
if (!multiProjects) {
|
|
45
|
+
options.jestConfig = path.resolve(context.root, options.jestConfig);
|
|
46
|
+
jestConfig = (yield (0, jest_config_1.readConfig)(config, options.jestConfig)).projectConfig;
|
|
47
|
+
}
|
|
48
|
+
// for backwards compatibility
|
|
49
|
+
if (options.setupFile && !multiProjects) {
|
|
50
|
+
const setupFilesAfterEnvSet = new Set([
|
|
51
|
+
...((_a = jestConfig.setupFilesAfterEnv) !== null && _a !== void 0 ? _a : []),
|
|
52
|
+
path.resolve(context.root, options.setupFile),
|
|
53
|
+
]);
|
|
54
|
+
config.setupFilesAfterEnv = Array.from(setupFilesAfterEnvSet);
|
|
55
|
+
}
|
|
56
|
+
if (options.testFile) {
|
|
57
|
+
config._.push(options.testFile);
|
|
58
|
+
}
|
|
59
|
+
if (options.findRelatedTests) {
|
|
60
|
+
const parsedTests = options.findRelatedTests
|
|
61
|
+
.split(',')
|
|
62
|
+
.map((s) => s.trim());
|
|
63
|
+
config._.push(...parsedTests);
|
|
64
|
+
config.findRelatedTests = true;
|
|
65
|
+
}
|
|
66
|
+
if (options.coverageDirectory) {
|
|
67
|
+
config.coverageDirectory = path.join(context.root, options.coverageDirectory);
|
|
68
|
+
}
|
|
69
|
+
if (options.clearCache) {
|
|
70
|
+
config.clearCache = true;
|
|
71
|
+
}
|
|
72
|
+
if (options.reporters && options.reporters.length > 0) {
|
|
73
|
+
config.reporters = options.reporters;
|
|
74
|
+
}
|
|
75
|
+
if (Array.isArray(options.coverageReporters) &&
|
|
76
|
+
options.coverageReporters.length > 0) {
|
|
77
|
+
config.coverageReporters = options.coverageReporters;
|
|
78
|
+
}
|
|
79
|
+
return config;
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
exports.jestConfigParser = jestConfigParser;
|
|
83
|
+
exports.default = jestExecutor;
|
|
84
|
+
function batchJest(taskGraph, inputs, overrides, context) {
|
|
85
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
86
|
+
let configPaths = [];
|
|
87
|
+
let selectedProjects = [];
|
|
88
|
+
let projectsWithNoName = [];
|
|
89
|
+
for (const task of taskGraph.roots) {
|
|
90
|
+
let configPath = path.resolve(context.root, inputs[task].jestConfig);
|
|
91
|
+
configPaths.push(configPath);
|
|
92
|
+
/* The display name in the jest.config.js is the correct project name jest
|
|
93
|
+
* uses to determine projects. It is usually the same as the Nx projectName
|
|
94
|
+
* but it can be changed. The safest method is to extract the displayName
|
|
95
|
+
* from the config file, but skip the project if it does not exist. */
|
|
96
|
+
const displayNameValueRegex = new RegExp(/(['"]+.*['"])(?<=displayName+.*)/, 'g');
|
|
97
|
+
const fileContents = (0, fs_1.readFileSync)(configPath, { encoding: 'utf-8' });
|
|
98
|
+
if (!displayNameValueRegex.test(fileContents)) {
|
|
99
|
+
projectsWithNoName.push([task.split(':')[0], configPath]);
|
|
100
|
+
continue;
|
|
101
|
+
}
|
|
102
|
+
const displayName = fileContents
|
|
103
|
+
.match(displayNameValueRegex)
|
|
104
|
+
.map((value) => value.substring(1, value.length - 1))[0];
|
|
105
|
+
selectedProjects.push(displayName);
|
|
106
|
+
}
|
|
107
|
+
if (projectsWithNoName.length > 0) {
|
|
108
|
+
throw new Error((0, devkit_1.stripIndents) `Some projects do not have a "displayName" property. Jest Batch Mode requires this to be set. Please ensure this value is set.
|
|
109
|
+
|
|
110
|
+
Projects missing "displayName":
|
|
111
|
+
${projectsWithNoName.map(([project, configPath]) => ` - ${project} - ${configPath}\r\n`)}
|
|
112
|
+
You can learn more about this requirement from Jest here: https://jestjs.io/docs/cli#--selectprojects-project1--projectn`);
|
|
113
|
+
}
|
|
114
|
+
const parsedConfigs = yield jestConfigParser(overrides, context, true);
|
|
115
|
+
const { globalConfig, results } = yield (0, jest_1.runCLI)(Object.assign(Object.assign({}, parsedConfigs), { selectProjects: selectedProjects }), [devkit_1.workspaceRoot]);
|
|
116
|
+
const { configs } = yield (0, jest_config_1.readConfigs)({ $0: undefined, _: [] }, configPaths);
|
|
117
|
+
const jestTaskExecutionResults = {};
|
|
118
|
+
for (let i = 0; i < taskGraph.roots.length; i++) {
|
|
119
|
+
let root = taskGraph.roots[i];
|
|
120
|
+
const aggregatedResults = (0, test_result_1.makeEmptyAggregatedTestResult)();
|
|
121
|
+
aggregatedResults.startTime = results.startTime;
|
|
122
|
+
let endTime;
|
|
123
|
+
const projectRoot = (0, path_1.join)(context.root, taskGraph.tasks[root].projectRoot);
|
|
124
|
+
let resultOutput = '';
|
|
125
|
+
for (const testResult of results.testResults) {
|
|
126
|
+
if (testResult.testFilePath.startsWith(projectRoot)) {
|
|
127
|
+
aggregatedResults.startTime = aggregatedResults.startTime
|
|
128
|
+
? Math.min(aggregatedResults.startTime, testResult.perfStats.start)
|
|
129
|
+
: testResult.perfStats.start;
|
|
130
|
+
endTime = endTime
|
|
131
|
+
? Math.max(testResult.perfStats.end, endTime)
|
|
132
|
+
: testResult.perfStats.end;
|
|
133
|
+
(0, test_result_1.addResult)(aggregatedResults, testResult);
|
|
134
|
+
resultOutput +=
|
|
135
|
+
'\n\r' +
|
|
136
|
+
reporters_1.utils.getResultHeader(testResult, globalConfig, configs[i]);
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
aggregatedResults.numTotalTestSuites = aggregatedResults.testResults.length;
|
|
140
|
+
jestTaskExecutionResults[root] = {
|
|
141
|
+
startTime: aggregatedResults.startTime,
|
|
142
|
+
endTime,
|
|
143
|
+
success: aggregatedResults.numFailedTests === 0,
|
|
144
|
+
// TODO(caleb): getSummary assumed endTime is Date.now().
|
|
145
|
+
// might need to make own method to correctly set the endtime base on tests instead of _now_
|
|
146
|
+
terminalOutput: resultOutput + '\n\r\n\r' + (0, summary_1.getSummary)(aggregatedResults),
|
|
147
|
+
};
|
|
148
|
+
}
|
|
149
|
+
return jestTaskExecutionResults;
|
|
150
|
+
});
|
|
151
|
+
}
|
|
152
|
+
exports.batchJest = batchJest;
|
|
153
|
+
//# sourceMappingURL=jest.impl.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jest.impl.js","sourceRoot":"","sources":["../../../../../../packages/jest/src/executors/jest/jest.impl.ts"],"names":[],"mappings":";;;;;;AAAA,yBAAuB;AACvB,+BAA8B;AAC9B,6CAAsD;AACtD,+CAA6D;AAC7D,mDAA6E;AAC7E,6BAA6B;AAC7B,+BAA4B;AAG5B,uCAKoB;AACpB,uCAAuC;AACvC,2BAAkC;AAElC,YAAA,OAAO,CAAC,GAAG,EAAC,QAAQ,uCAAR,QAAQ,GAAK,MAAM,EAAC;AAEhC,SAAsB,YAAY,CAChC,OAA4B,EAC5B,OAAwB;;QAExB,MAAM,MAAM,GAAG,MAAM,gBAAgB,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QAExD,MAAM,EAAE,OAAO,EAAE,GAAG,MAAM,IAAA,aAAM,EAAC,MAAM,EAAE,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC;QAE/D,OAAO,EAAE,OAAO,EAAE,OAAO,CAAC,OAAO,E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,UAAU,CAAC,SAAS,CAAC,GAAG,CAAC;oBAE7B,IAAA,uBAAS,EAAC,iBAAiB,EAAE,UAAU,CAAC,CAAC;oBAEzC,YAAY;wBACV,MAAM;4BACN,iBAAiB,CAAC,eAAe,CAC/B,UAAiB,EACjB,YAAmB,EACnB,OAAO,CAAC,CAAC,CAAQ,CAClB,CAAC;iBACL;aACF;YAED,iBAAiB,CAAC,kBAAkB,GAAG,iBAAiB,CAAC,WAAW,CAAC,MAAM,CAAC;YAE5E,wBAAwB,CAAC,IAAI,CAAC,GAAG;gBAC/B,SAAS,EAAE,iBAAiB,CAAC,SAAS;gBACtC,OAAO;gBACP,OAAO,EAAE,iBAAiB,CAAC,cAAc,KAAK,CAAC;gBAC/C,yDAAyD;gBACzD,4FAA4F;gBAC5F,cAAc,EACZ,YAAY,GAAG,UAAU,GAAG,IAAA,oBAAU,EAAC,iBAAwB,CAAC;aACnE,CAAC;SACH;QAED,OAAO,wBAAwB,CAAC;IAClC,CAAC;CAAA;AAnGD,8BAmGC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
export interface JestExecutorOptions {
|
|
2
|
+
codeCoverage?: boolean;
|
|
3
|
+
config?: string;
|
|
4
|
+
detectOpenHandles?: boolean;
|
|
5
|
+
logHeapUsage?: boolean;
|
|
6
|
+
detectLeaks?: boolean;
|
|
7
|
+
jestConfig: string;
|
|
8
|
+
testFile?: string;
|
|
9
|
+
/**
|
|
10
|
+
* @deprecated set in the jest config file instead
|
|
11
|
+
**/
|
|
12
|
+
setupFile?: string;
|
|
13
|
+
bail?: boolean | number;
|
|
14
|
+
ci?: boolean;
|
|
15
|
+
color?: boolean;
|
|
16
|
+
clearCache?: boolean;
|
|
17
|
+
findRelatedTests?: string;
|
|
18
|
+
json?: boolean;
|
|
19
|
+
maxWorkers?: number | string;
|
|
20
|
+
onlyChanged?: boolean;
|
|
21
|
+
changedSince?: string;
|
|
22
|
+
outputFile?: string;
|
|
23
|
+
passWithNoTests?: boolean;
|
|
24
|
+
runInBand?: boolean;
|
|
25
|
+
showConfig?: boolean;
|
|
26
|
+
silent?: boolean;
|
|
27
|
+
testNamePattern?: string;
|
|
28
|
+
testPathIgnorePatterns?: string[];
|
|
29
|
+
testPathPattern?: string[];
|
|
30
|
+
colors?: boolean;
|
|
31
|
+
reporters?: string[];
|
|
32
|
+
verbose?: boolean;
|
|
33
|
+
coverageReporters?: string[];
|
|
34
|
+
coverageDirectory?: string;
|
|
35
|
+
testResultsProcessor?: string;
|
|
36
|
+
updateSnapshot?: boolean;
|
|
37
|
+
useStderr?: boolean;
|
|
38
|
+
watch?: boolean;
|
|
39
|
+
watchAll?: boolean;
|
|
40
|
+
testLocationInResults?: boolean;
|
|
41
|
+
testTimeout?: number;
|
|
42
|
+
}
|
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 2,
|
|
3
|
+
"outputCapture": "direct-nodejs",
|
|
4
|
+
"title": "Jest Builder",
|
|
5
|
+
"description": "Jest target options for Build Facade.",
|
|
6
|
+
"cli": "nx",
|
|
7
|
+
"type": "object",
|
|
8
|
+
"presets": [
|
|
9
|
+
{
|
|
10
|
+
"name": "Pass Without Tests",
|
|
11
|
+
"keys": ["jestConfig", "passWithNoTests"]
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"name": "Code Coverage",
|
|
15
|
+
"keys": ["jestConfig", "coverageReporters"]
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"name": "Stop After 'n' Failed",
|
|
19
|
+
"keys": ["jestConfig", "bail"]
|
|
20
|
+
}
|
|
21
|
+
],
|
|
22
|
+
"properties": {
|
|
23
|
+
"codeCoverage": {
|
|
24
|
+
"description": "Indicates that test coverage information should be collected and reported in the output. (https://jestjs.io/docs/cli#--coverageboolean)",
|
|
25
|
+
"type": "boolean",
|
|
26
|
+
"aliases": ["coverage"]
|
|
27
|
+
},
|
|
28
|
+
"config": {
|
|
29
|
+
"description": "The path to a Jest config file specifying how to find and execute tests. If no `rootDir` is set in the config, the directory containing the config file is assumed to be the `rootDir` for the project. This can also be a JSON-encoded value which Jest will use as configuration.",
|
|
30
|
+
"type": "string"
|
|
31
|
+
},
|
|
32
|
+
"clearCache": {
|
|
33
|
+
"description": "Deletes the Jest cache directory and then exits without running tests. Will delete Jest's default cache directory. _Note: clearing the cache will reduce performance_.",
|
|
34
|
+
"type": "boolean"
|
|
35
|
+
},
|
|
36
|
+
"detectOpenHandles": {
|
|
37
|
+
"description": "Attempt to collect and print open handles preventing Jest from exiting cleanly (https://jestjs.io/docs/cli#--detectopenhandles)",
|
|
38
|
+
"type": "boolean"
|
|
39
|
+
},
|
|
40
|
+
"logHeapUsage": {
|
|
41
|
+
"description": "Logs the heap usage after every test. Useful to debug memory leaks. Use together with --runInBand and --expose-gc in node.",
|
|
42
|
+
"type": "boolean"
|
|
43
|
+
},
|
|
44
|
+
"detectLeaks": {
|
|
45
|
+
"description": "**EXPERIMENTAL**: Detect memory leaks in tests. After executing a test, it will try to garbage collect the global object used, and fail if it was leaked",
|
|
46
|
+
"type": "boolean"
|
|
47
|
+
},
|
|
48
|
+
"jestConfig": {
|
|
49
|
+
"description": "The path of the Jest configuration. (https://jestjs.io/docs/en/configuration)",
|
|
50
|
+
"type": "string",
|
|
51
|
+
"x-completion-type": "file",
|
|
52
|
+
"x-completion-glob": "jest.config@(.js|.ts)"
|
|
53
|
+
},
|
|
54
|
+
"testFile": {
|
|
55
|
+
"description": "The name of the file to test.",
|
|
56
|
+
"type": "string"
|
|
57
|
+
},
|
|
58
|
+
"tsConfig": {
|
|
59
|
+
"description": "The name of the Typescript configuration file.",
|
|
60
|
+
"type": "string",
|
|
61
|
+
"x-deprecated": "Use the ts-jest configuration options in the jest config file instead."
|
|
62
|
+
},
|
|
63
|
+
"setupFile": {
|
|
64
|
+
"description": "The name of a setup file used by Jest.",
|
|
65
|
+
"type": "string",
|
|
66
|
+
"x-deprecated": "Use the setupFilesAfterEnv option in the jest config file. https://jestjs.io/docs/en/configuration#setupfilesafterenv-array"
|
|
67
|
+
},
|
|
68
|
+
"bail": {
|
|
69
|
+
"alias": "b",
|
|
70
|
+
"description": "Exit the test suite immediately after `n` number of failing tests. (https://jestjs.io/docs/cli#--bail)",
|
|
71
|
+
"oneOf": [
|
|
72
|
+
{
|
|
73
|
+
"type": "number"
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
"type": "boolean"
|
|
77
|
+
}
|
|
78
|
+
]
|
|
79
|
+
},
|
|
80
|
+
"ci": {
|
|
81
|
+
"description": "Whether to run Jest in continuous integration (CI) mode. This option is on by default in most popular CI environments. It will prevent snapshots from being written unless explicitly requested. (https://jestjs.io/docs/cli#--ci)",
|
|
82
|
+
"type": "boolean"
|
|
83
|
+
},
|
|
84
|
+
"color": {
|
|
85
|
+
"alias": "colors",
|
|
86
|
+
"description": "Forces test results output color highlighting (even if `stdout` is not a TTY). Set to false if you would like to have no colors. (https://jestjs.io/docs/cli#--colors)",
|
|
87
|
+
"type": "boolean"
|
|
88
|
+
},
|
|
89
|
+
"findRelatedTests": {
|
|
90
|
+
"description": "Find and run the tests that cover a comma separated list of source files that were passed in as arguments. (https://jestjs.io/docs/cli#--findrelatedtests-spaceseparatedlistofsourcefiles)",
|
|
91
|
+
"type": "string"
|
|
92
|
+
},
|
|
93
|
+
"json": {
|
|
94
|
+
"description": "Prints the test results in `JSON`. This mode will send all other test output and user messages to `stderr`. (https://jestjs.io/docs/cli#--json)",
|
|
95
|
+
"type": "boolean"
|
|
96
|
+
},
|
|
97
|
+
"maxWorkers": {
|
|
98
|
+
"alias": "w",
|
|
99
|
+
"description": "Specifies the maximum number of workers the worker-pool will spawn for running tests. This defaults to the number of the cores available on your machine. Useful for CI. (its usually best not to override this default) (https://jestjs.io/docs/cli#--maxworkersnumstring)",
|
|
100
|
+
"oneOf": [
|
|
101
|
+
{
|
|
102
|
+
"type": "number"
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
"type": "string"
|
|
106
|
+
}
|
|
107
|
+
]
|
|
108
|
+
},
|
|
109
|
+
"onlyChanged": {
|
|
110
|
+
"alias": "o",
|
|
111
|
+
"description": "Attempts to identify which tests to run based on which files have changed in the current repository. Only works if you're running tests in a `git` or `hg` repository at the moment. (https://jestjs.io/docs/cli#--onlychanged)",
|
|
112
|
+
"type": "boolean"
|
|
113
|
+
},
|
|
114
|
+
"changedSince": {
|
|
115
|
+
"description": "Runs tests related to the changes since the provided branch or commit hash. If the current branch has diverged from the given branch, then only changes made locally will be tested. (https://jestjs.io/docs/cli#--changedsince)",
|
|
116
|
+
"type": "string"
|
|
117
|
+
},
|
|
118
|
+
"outputFile": {
|
|
119
|
+
"description": "Write test results to a file when the `--json` option is also specified. (https://jestjs.io/docs/cli#--outputfilefilename)",
|
|
120
|
+
"type": "string"
|
|
121
|
+
},
|
|
122
|
+
"passWithNoTests": {
|
|
123
|
+
"description": "Will not fail if no tests are found (for example while using `--testPathPattern`.) (https://jestjs.io/docs/cli#--passwithnotests)",
|
|
124
|
+
"type": "boolean"
|
|
125
|
+
},
|
|
126
|
+
"runInBand": {
|
|
127
|
+
"alias": "i",
|
|
128
|
+
"description": "Run all tests serially in the current process (rather than creating a worker pool of child processes that run tests). This is sometimes useful for debugging, but such use cases are pretty rare. Useful for CI. (https://jestjs.io/docs/cli#--runinband)",
|
|
129
|
+
"type": "boolean"
|
|
130
|
+
},
|
|
131
|
+
"showConfig": {
|
|
132
|
+
"description": "Print your Jest config and then exits. (https://jestjs.io/docs/en/cli#--showconfig)",
|
|
133
|
+
"type": "boolean"
|
|
134
|
+
},
|
|
135
|
+
"silent": {
|
|
136
|
+
"description": "Prevent tests from printing messages through the console. (https://jestjs.io/docs/cli#--silent)",
|
|
137
|
+
"type": "boolean"
|
|
138
|
+
},
|
|
139
|
+
"testNamePattern": {
|
|
140
|
+
"alias": "t",
|
|
141
|
+
"description": "Run only tests with a name that matches the regex pattern. (https://jestjs.io/docs/cli#--testnamepatternregex)",
|
|
142
|
+
"type": "string"
|
|
143
|
+
},
|
|
144
|
+
"testPathIgnorePatterns": {
|
|
145
|
+
"description": "An array of regexp pattern strings that is matched against all tests paths before executing the test. Only run those tests with a path that does not match with the provided regexp expressions. (https://jestjs.io/docs/cli#--testpathignorepatternsregexarray)",
|
|
146
|
+
"type": "array",
|
|
147
|
+
"items": {
|
|
148
|
+
"type": "string"
|
|
149
|
+
}
|
|
150
|
+
},
|
|
151
|
+
"testPathPattern": {
|
|
152
|
+
"description": "An array of regexp pattern strings that is matched against all tests paths before executing the test. (https://jestjs.io/docs/cli#--testpathpatternregex)",
|
|
153
|
+
"type": "array",
|
|
154
|
+
"items": {
|
|
155
|
+
"type": "string"
|
|
156
|
+
},
|
|
157
|
+
"default": []
|
|
158
|
+
},
|
|
159
|
+
"colors": {
|
|
160
|
+
"description": "Forces test results output highlighting even if stdout is not a TTY. (https://jestjs.io/docs/cli#--colors)",
|
|
161
|
+
"type": "boolean"
|
|
162
|
+
},
|
|
163
|
+
"reporters": {
|
|
164
|
+
"description": "Run tests with specified reporters. Reporter options are not available via CLI. Example with multiple reporters: `jest --reporters=\"default\" --reporters=\"jest-junit\"`. (https://jestjs.io/docs/cli#--reporters)",
|
|
165
|
+
"type": "array",
|
|
166
|
+
"items": {
|
|
167
|
+
"type": "string"
|
|
168
|
+
}
|
|
169
|
+
},
|
|
170
|
+
"verbose": {
|
|
171
|
+
"description": "Display individual test results with the test suite hierarchy. (https://jestjs.io/docs/cli#--verbose)",
|
|
172
|
+
"type": "boolean"
|
|
173
|
+
},
|
|
174
|
+
"coverageReporters": {
|
|
175
|
+
"description": "A list of reporter names that Jest uses when writing coverage reports. Any istanbul reporter.",
|
|
176
|
+
"type": "array",
|
|
177
|
+
"items": {
|
|
178
|
+
"type": "string"
|
|
179
|
+
}
|
|
180
|
+
},
|
|
181
|
+
"coverageDirectory": {
|
|
182
|
+
"description": "The directory where Jest should output its coverage files.",
|
|
183
|
+
"type": "string",
|
|
184
|
+
"x-completion-type": "directory"
|
|
185
|
+
},
|
|
186
|
+
"testResultsProcessor": {
|
|
187
|
+
"description": "Node module that implements a custom results processor. (https://jestjs.io/docs/en/configuration#testresultsprocessor-string)",
|
|
188
|
+
"type": "string"
|
|
189
|
+
},
|
|
190
|
+
"updateSnapshot": {
|
|
191
|
+
"alias": "u",
|
|
192
|
+
"description": "Use this flag to re-record snapshots. Can be used together with a test suite pattern or with `--testNamePattern` to re-record snapshot for test matching the pattern. (https://jestjs.io/docs/cli#--updatesnapshot)",
|
|
193
|
+
"type": "boolean"
|
|
194
|
+
},
|
|
195
|
+
"useStderr": {
|
|
196
|
+
"description": "Divert all output to stderr.",
|
|
197
|
+
"type": "boolean"
|
|
198
|
+
},
|
|
199
|
+
"watch": {
|
|
200
|
+
"description": "Watch files for changes and rerun tests related to changed files. If you want to re-run all tests when a file has changed, use the `--watchAll` option. (https://jestjs.io/docs/cli#--watch)",
|
|
201
|
+
"type": "boolean"
|
|
202
|
+
},
|
|
203
|
+
"watchAll": {
|
|
204
|
+
"description": "Watch files for changes and rerun all tests when something changes. If you want to re-run only the tests that depend on the changed files, use the `--watch` option. (https://jestjs.io/docs/cli#--watchall)",
|
|
205
|
+
"type": "boolean"
|
|
206
|
+
},
|
|
207
|
+
"testLocationInResults": {
|
|
208
|
+
"description": "Adds a location field to test results. Used to report location of a test in a reporter. { \"column\": 4, \"line\": 5 } (https://jestjs.io/docs/cli#--testlocationinresults)",
|
|
209
|
+
"type": "boolean"
|
|
210
|
+
},
|
|
211
|
+
"testTimeout": {
|
|
212
|
+
"description": "Default timeout of a test in milliseconds. Default value: `5000`. (https://jestjs.io/docs/cli#--testtimeoutnumber)",
|
|
213
|
+
"type": "number"
|
|
214
|
+
}
|
|
215
|
+
},
|
|
216
|
+
"required": ["jestConfig"],
|
|
217
|
+
"examplesFile": "../../../docs/jest-examples.md"
|
|
218
|
+
}
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getSummary = void 0;
|
|
4
|
+
const jest_util_1 = require("jest-util");
|
|
5
|
+
const chalk = require("chalk");
|
|
6
|
+
/**
|
|
7
|
+
* Copied from the jest repo because these utility functions are not exposed through the package
|
|
8
|
+
* https://github.com/facebook/jest/blob/7a64ede2163eba4ecc725f448cd92102cd8c14aa/packages/jest-reporters/src/utils.ts
|
|
9
|
+
*/
|
|
10
|
+
const PROGRESS_BAR_WIDTH = 40;
|
|
11
|
+
const getValuesCurrentTestCases = (currentTestCases = []) => {
|
|
12
|
+
let numFailingTests = 0;
|
|
13
|
+
let numPassingTests = 0;
|
|
14
|
+
let numPendingTests = 0;
|
|
15
|
+
let numTodoTests = 0;
|
|
16
|
+
let numTotalTests = 0;
|
|
17
|
+
currentTestCases.forEach((testCase) => {
|
|
18
|
+
switch (testCase.testCaseResult.status) {
|
|
19
|
+
case 'failed': {
|
|
20
|
+
numFailingTests++;
|
|
21
|
+
break;
|
|
22
|
+
}
|
|
23
|
+
case 'passed': {
|
|
24
|
+
numPassingTests++;
|
|
25
|
+
break;
|
|
26
|
+
}
|
|
27
|
+
case 'skipped': {
|
|
28
|
+
numPendingTests++;
|
|
29
|
+
break;
|
|
30
|
+
}
|
|
31
|
+
case 'todo': {
|
|
32
|
+
numTodoTests++;
|
|
33
|
+
break;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
numTotalTests++;
|
|
37
|
+
});
|
|
38
|
+
return {
|
|
39
|
+
numFailingTests,
|
|
40
|
+
numPassingTests,
|
|
41
|
+
numPendingTests,
|
|
42
|
+
numTodoTests,
|
|
43
|
+
numTotalTests,
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
const renderTime = (runTime, estimatedTime, width) => {
|
|
47
|
+
// If we are more than one second over the estimated time, highlight it.
|
|
48
|
+
const renderedTime = estimatedTime && runTime >= estimatedTime + 1
|
|
49
|
+
? chalk.bold.yellow((0, jest_util_1.formatTime)(runTime, 0))
|
|
50
|
+
: (0, jest_util_1.formatTime)(runTime, 0);
|
|
51
|
+
let time = chalk.bold(`Time:`) + ` ${renderedTime}`;
|
|
52
|
+
if (runTime < estimatedTime) {
|
|
53
|
+
time += `, estimated ${(0, jest_util_1.formatTime)(estimatedTime, 0)}`;
|
|
54
|
+
}
|
|
55
|
+
// Only show a progress bar if the test run is actually going to take
|
|
56
|
+
// some time.
|
|
57
|
+
if (estimatedTime > 2 && runTime < estimatedTime && width) {
|
|
58
|
+
const availableWidth = Math.min(PROGRESS_BAR_WIDTH, width);
|
|
59
|
+
const length = Math.min(Math.floor((runTime / estimatedTime) * availableWidth), availableWidth);
|
|
60
|
+
if (availableWidth >= 2) {
|
|
61
|
+
time +=
|
|
62
|
+
'\n' +
|
|
63
|
+
chalk.green('█').repeat(length) +
|
|
64
|
+
chalk.white('█').repeat(availableWidth - length);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
return time;
|
|
68
|
+
};
|
|
69
|
+
const getSummary = (aggregatedResults, options) => {
|
|
70
|
+
let runTime = (Date.now() - aggregatedResults.startTime) / 1000;
|
|
71
|
+
if (options === null || options === void 0 ? void 0 : options.roundTime) {
|
|
72
|
+
runTime = Math.floor(runTime);
|
|
73
|
+
}
|
|
74
|
+
const { numFailingTests, numPendingTests, numTodoTests, numPassingTests, numTotalTests, } = getValuesCurrentTestCases(options === null || options === void 0 ? void 0 : options.currentTestCases);
|
|
75
|
+
const estimatedTime = (options === null || options === void 0 ? void 0 : options.estimatedTime) || 0;
|
|
76
|
+
const snapshotResults = aggregatedResults.snapshot;
|
|
77
|
+
const snapshotsAdded = snapshotResults.added;
|
|
78
|
+
const snapshotsFailed = snapshotResults.unmatched;
|
|
79
|
+
const snapshotsOutdated = snapshotResults.unchecked;
|
|
80
|
+
const snapshotsFilesRemoved = snapshotResults.filesRemoved;
|
|
81
|
+
const snapshotsDidUpdate = snapshotResults.didUpdate;
|
|
82
|
+
const snapshotsPassed = snapshotResults.matched;
|
|
83
|
+
const snapshotsTotal = snapshotResults.total;
|
|
84
|
+
const snapshotsUpdated = snapshotResults.updated;
|
|
85
|
+
const suitesFailed = aggregatedResults.numFailedTestSuites;
|
|
86
|
+
const suitesPassed = aggregatedResults.numPassedTestSuites;
|
|
87
|
+
const suitesPending = aggregatedResults.numPendingTestSuites;
|
|
88
|
+
const suitesRun = suitesFailed + suitesPassed;
|
|
89
|
+
const suitesTotal = aggregatedResults.numTotalTestSuites;
|
|
90
|
+
const testsFailed = aggregatedResults.numFailedTests;
|
|
91
|
+
const testsPassed = aggregatedResults.numPassedTests;
|
|
92
|
+
const testsPending = aggregatedResults.numPendingTests;
|
|
93
|
+
const testsTodo = aggregatedResults.numTodoTests;
|
|
94
|
+
const testsTotal = aggregatedResults.numTotalTests;
|
|
95
|
+
const width = (options === null || options === void 0 ? void 0 : options.width) || 0;
|
|
96
|
+
const suites = chalk.bold('Test Suites: ') +
|
|
97
|
+
(suitesFailed ? chalk.bold.red(`${suitesFailed} failed`) + ', ' : '') +
|
|
98
|
+
(suitesPending
|
|
99
|
+
? chalk.bold.yellow(`${suitesPending} skipped`) + ', '
|
|
100
|
+
: '') +
|
|
101
|
+
(suitesPassed ? chalk.bold.green(`${suitesPassed} passed`) + ', ' : '') +
|
|
102
|
+
(suitesRun !== suitesTotal
|
|
103
|
+
? suitesRun + ' of ' + suitesTotal
|
|
104
|
+
: suitesTotal) +
|
|
105
|
+
` total`;
|
|
106
|
+
const updatedTestsFailed = testsFailed + numFailingTests;
|
|
107
|
+
const updatedTestsPending = testsPending + numPendingTests;
|
|
108
|
+
const updatedTestsTodo = testsTodo + numTodoTests;
|
|
109
|
+
const updatedTestsPassed = testsPassed + numPassingTests;
|
|
110
|
+
const updatedTestsTotal = testsTotal + numTotalTests;
|
|
111
|
+
const tests = chalk.bold('Tests: ') +
|
|
112
|
+
(updatedTestsFailed > 0
|
|
113
|
+
? chalk.bold.red(`${updatedTestsFailed} failed`) + ', '
|
|
114
|
+
: '') +
|
|
115
|
+
(updatedTestsPending > 0
|
|
116
|
+
? chalk.bold.yellow(`${updatedTestsPending} skipped`) + ', '
|
|
117
|
+
: '') +
|
|
118
|
+
(updatedTestsTodo > 0
|
|
119
|
+
? chalk.bold.magenta(`${updatedTestsTodo} todo`) + ', '
|
|
120
|
+
: '') +
|
|
121
|
+
(updatedTestsPassed > 0
|
|
122
|
+
? chalk.bold.green(`${updatedTestsPassed} passed`) + ', '
|
|
123
|
+
: '') +
|
|
124
|
+
`${updatedTestsTotal} total`;
|
|
125
|
+
const snapshots = chalk.bold('Snapshots: ') +
|
|
126
|
+
(snapshotsFailed
|
|
127
|
+
? chalk.bold.red(`${snapshotsFailed} failed`) + ', '
|
|
128
|
+
: '') +
|
|
129
|
+
(snapshotsOutdated && !snapshotsDidUpdate
|
|
130
|
+
? chalk.bold.yellow(`${snapshotsOutdated} obsolete`) + ', '
|
|
131
|
+
: '') +
|
|
132
|
+
(snapshotsOutdated && snapshotsDidUpdate
|
|
133
|
+
? chalk.bold.green(`${snapshotsOutdated} removed`) + ', '
|
|
134
|
+
: '') +
|
|
135
|
+
(snapshotsFilesRemoved && !snapshotsDidUpdate
|
|
136
|
+
? chalk.bold.yellow((0, jest_util_1.pluralize)('file', snapshotsFilesRemoved) + ' obsolete') + ', '
|
|
137
|
+
: '') +
|
|
138
|
+
(snapshotsFilesRemoved && snapshotsDidUpdate
|
|
139
|
+
? chalk.bold.green((0, jest_util_1.pluralize)('file', snapshotsFilesRemoved) + ' removed') + ', '
|
|
140
|
+
: '') +
|
|
141
|
+
(snapshotsUpdated
|
|
142
|
+
? chalk.bold.green(`${snapshotsUpdated} updated`) + ', '
|
|
143
|
+
: '') +
|
|
144
|
+
(snapshotsAdded
|
|
145
|
+
? chalk.bold.green(`${snapshotsAdded} written`) + ', '
|
|
146
|
+
: '') +
|
|
147
|
+
(snapshotsPassed
|
|
148
|
+
? chalk.bold.green(`${snapshotsPassed} passed`) + ', '
|
|
149
|
+
: '') +
|
|
150
|
+
`${snapshotsTotal} total`;
|
|
151
|
+
const time = renderTime(runTime, estimatedTime, width);
|
|
152
|
+
return [suites, tests, snapshots, time].join('\n');
|
|
153
|
+
};
|
|
154
|
+
exports.getSummary = getSummary;
|
|
155
|
+
//# sourceMappingURL=summary.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"summary.js","sourceRoot":"","sources":["../../../../../../packages/jest/src/executors/jest/summary.ts"],"names":[],"mappings":";;;AACA,yCAAkD;AAClD,+BAA+B;AAE/B;;;GAGG;AAEH,MAAM,kBAAkB,GAAG,EAAE,CAAC;AAE9B,MAAM,yBAAyB,GAAG,CAAC,gBAAgB,GAAG,EAAE,EAAE,EAAE;IAC1D,IAAI,eAAe,GAAG,CAAC,CAAC;IACxB,IAAI,eAAe,GAAG,CAAC,CAAC;IACxB,IAAI,eAAe,GAAG,CAAC,CAAC;IACxB,IAAI,YAAY,GAAG,CAAC,CAAC;IACrB,IAAI,aAAa,GAAG,CAAC,CAAC;IACtB,gBAAgB,CAAC,OAAO,CAAC,CAAC,QAAQ,EAAE,EAAE;QACpC,QAAQ,QAAQ,CAAC,cAAc,CAAC,MAAM,EAAE;YACtC,KAAK,QAAQ,CAAC,CAAC;gBACb,eAAe,EAAE,CAAC;gBAClB,MAAM;aACP;YACD,KAAK,QAAQ,CAAC,CAAC;gBACb,eAAe,EAAE,CAAC;gBAClB,MAAM;aACP;YACD,KAAK,SAAS,CAAC,CAAC;gBACd,eAAe,EAAE,CAAC;gBAClB,MAAM;aACP;YACD,KAAK,MAAM,CAAC,CAAC;gBACX,YAAY,EAAE,CAAC;gBACf,MAAM;aACP;SACF;QACD,aAAa,EAAE,CAAC;IAClB,CAAC,CAAC,CAAC;IAEH,OAAO;QACL,eAAe;QACf,eAAe;QACf,eAAe;QACf,YAAY;QACZ,aAAa;KACd,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,UAAU,GAAG,CAAC,OAAe,EAAE,aAAqB,EAAE,KAAa,EAAE,EAAE;IAC3E,wEAAwE;IACxE,MAAM,YAAY,GA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,IAAI,kBAAkB;YAC1C,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CACd,IAAA,qBAAS,EAAC,MAAM,EAAE,qBAAqB,CAAC,GAAG,UAAU,CACtD,GAAG,IAAI;YACV,CAAC,CAAC,EAAE,CAAC;QACP,CAAC,gBAAgB;YACf,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,gBAAgB,UAAU,CAAC,GAAG,IAAI;YACxD,CAAC,CAAC,EAAE,CAAC;QACP,CAAC,cAAc;YACb,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,cAAc,UAAU,CAAC,GAAG,IAAI;YACtD,CAAC,CAAC,EAAE,CAAC;QACP,CAAC,eAAe;YACd,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,eAAe,SAAS,CAAC,GAAG,IAAI;YACtD,CAAC,CAAC,EAAE,CAAC;QACP,GAAG,cAAc,QAAQ,CAAC;IAE5B,MAAM,IAAI,GAAG,UAAU,CAAC,OAAO,EAAE,aAAa,EAAE,KAAK,CAAC,CAAC;IACvD,OAAO,CAAC,MAAM,EAAE,KAAK,EAAE,SAAS,EAAE,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACrD,CAAC,CAAC;AAhHW,QAAA,UAAU,cAgHrB"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { GeneratorCallback, Tree } from '@nx/devkit';
|
|
2
|
+
import { JestInitSchema } from './schema';
|
|
3
|
+
export declare function jestInitGenerator(tree: Tree, schema: JestInitSchema): Promise<GeneratorCallback>;
|
|
4
|
+
export default jestInitGenerator;
|
|
5
|
+
export declare const jestInitSchematic: (generatorOptions: JestInitSchema) => (tree: any, context: any) => Promise<any>;
|