@powerlines/plugin-jest 0.1.338 → 0.1.340

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/index.mjs CHANGED
@@ -102,5 +102,4 @@ ${chalk.bold(`Time:`)} ${formatTime((Date.now() - results.startTime) / 1e
102
102
  var src_default = plugin;
103
103
 
104
104
  //#endregion
105
- export { src_default as default, plugin };
106
- //# sourceMappingURL=index.mjs.map
105
+ export { src_default as default, plugin };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@powerlines/plugin-jest",
3
- "version": "0.1.338",
3
+ "version": "0.1.340",
4
4
  "type": "module",
5
5
  "description": "A package containing the Jest testing plugin for Powerlines.",
6
6
  "repository": {
@@ -89,24 +89,24 @@
89
89
  "files": ["dist/**/*"],
90
90
  "keywords": ["jest", "powerlines", "storm-software", "powerlines-plugin"],
91
91
  "dependencies": {
92
- "@jest/reporters": "^30.2.0",
93
- "@jest/test-result": "^30.2.0",
94
- "@stryke/fs": "^0.33.55",
95
- "@stryke/path": "^0.26.17",
92
+ "@jest/reporters": "^30.3.0",
93
+ "@jest/test-result": "^30.3.0",
94
+ "@stryke/fs": "^0.33.56",
95
+ "@stryke/path": "^0.26.18",
96
96
  "chalk": "5.6.2",
97
97
  "defu": "^6.1.4",
98
- "jest": "^30.2.0",
99
- "jest-config": "^30.2.0",
100
- "jest-resolve": "^30.2.0",
101
- "jest-util": "^30.2.0",
102
- "powerlines": "^0.40.17"
98
+ "jest": "^30.3.0",
99
+ "jest-config": "^30.3.0",
100
+ "jest-resolve": "^30.3.0",
101
+ "jest-util": "^30.3.0",
102
+ "powerlines": "^0.40.19"
103
103
  },
104
104
  "devDependencies": {
105
- "@jest/types": "^30.2.0",
106
- "@powerlines/plugin-plugin": "^0.12.281",
105
+ "@jest/types": "^30.3.0",
106
+ "@powerlines/plugin-plugin": "^0.12.283",
107
107
  "@types/jest": "^30.0.0"
108
108
  },
109
109
  "publishConfig": { "access": "public" },
110
110
  "types": "./dist/index.d.cts",
111
- "gitHead": "dde0f2e2684c65303dc81833f1d39c2c77910e22"
111
+ "gitHead": "7496a546473274494be487ebc33cf267ed5cd1f0"
112
112
  }
package/dist/index.d.cts DELETED
@@ -1,20 +0,0 @@
1
- import { JestPluginContext, JestPluginOptions, JestPluginResolvedConfig, JestPluginUserConfig, __ΩJestPluginContext, __ΩJestPluginOptions, __ΩJestPluginResolvedConfig, __ΩJestPluginUserConfig } from "./types/plugin.cjs";
2
- import "./types/index.cjs";
3
- import { Plugin } from "powerlines";
4
-
5
- //#region src/index.d.ts
6
- declare module "powerlines" {
7
- interface Config {
8
- jest?: JestPluginOptions;
9
- }
10
- }
11
- /**
12
- * Jest plugin for Powerlines.
13
- *
14
- * @param options - The Jest plugin user configuration options.
15
- * @returns A Powerlines plugin that integrates Jest testing.
16
- */
17
- declare const plugin: <TContext extends JestPluginContext = JestPluginContext>(options?: JestPluginOptions) => Plugin<TContext>;
18
- //#endregion
19
- export { JestPluginContext, JestPluginOptions, JestPluginResolvedConfig, JestPluginUserConfig, __ΩJestPluginContext, __ΩJestPluginOptions, __ΩJestPluginResolvedConfig, __ΩJestPluginUserConfig, plugin as default, plugin };
20
- //# sourceMappingURL=index.d.cts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.cts","names":[],"sources":["../src/index.ts"],"sourcesContent":[],"mappings":";;;;;;;IA8BwB,IAAA,CAAA,EAIb,iBAJa;EAAA;;;;AAcxB;;;;AAEU,cAFG,MAEH,EAAA,CAAA,iBAF8B,iBAE9B,GAFkD,iBAElD,CAAA,CAAA,OAAA,CAAA,EADC,iBACD,EAAA,GAAP,MAAO,CAAA,QAAA,CAAA"}
package/dist/index.d.mts DELETED
@@ -1,20 +0,0 @@
1
- import { JestPluginContext, JestPluginOptions, JestPluginResolvedConfig, JestPluginUserConfig, __ΩJestPluginContext, __ΩJestPluginOptions, __ΩJestPluginResolvedConfig, __ΩJestPluginUserConfig } from "./types/plugin.mjs";
2
- import "./types/index.mjs";
3
- import { Plugin } from "powerlines";
4
-
5
- //#region src/index.d.ts
6
- declare module "powerlines" {
7
- interface Config {
8
- jest?: JestPluginOptions;
9
- }
10
- }
11
- /**
12
- * Jest plugin for Powerlines.
13
- *
14
- * @param options - The Jest plugin user configuration options.
15
- * @returns A Powerlines plugin that integrates Jest testing.
16
- */
17
- declare const plugin: <TContext extends JestPluginContext = JestPluginContext>(options?: JestPluginOptions) => Plugin<TContext>;
18
- //#endregion
19
- export { JestPluginContext, JestPluginOptions, JestPluginResolvedConfig, JestPluginUserConfig, __ΩJestPluginContext, __ΩJestPluginOptions, __ΩJestPluginResolvedConfig, __ΩJestPluginUserConfig, plugin as default, plugin };
20
- //# sourceMappingURL=index.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.ts"],"sourcesContent":[],"mappings":";;;;;;;IA8BwB,IAAA,CAAA,EAIb,iBAJa;EAAA;;;;AAcxB;;;;AAEU,cAFG,MAEH,EAAA,CAAA,iBAF8B,iBAE9B,GAFkD,iBAElD,CAAA,CAAA,OAAA,CAAA,EADC,iBACD,EAAA,GAAP,MAAO,CAAA,QAAA,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.mjs","names":["config: Config.Argv"],"sources":["../src/index.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { Config } from \"@jest/types\";\nimport { joinPaths } from \"@stryke/path/join\";\nimport chalk from \"chalk\";\nimport { runCLI } from \"jest\";\nimport { formatTime, pluralize } from \"jest-util\";\nimport { Plugin } from \"powerlines\";\nimport {\n JestPluginContext,\n JestPluginOptions,\n JestPluginUserConfig\n} from \"./types/plugin\";\n\nexport * from \"./types\";\n\ndeclare module \"powerlines\" {\n interface Config {\n jest?: JestPluginOptions;\n }\n}\n\n/**\n * Jest plugin for Powerlines.\n *\n * @param options - The Jest plugin user configuration options.\n * @returns A Powerlines plugin that integrates Jest testing.\n */\nexport const plugin = <TContext extends JestPluginContext = JestPluginContext>(\n options: JestPluginOptions = {}\n): Plugin<TContext> => {\n return {\n name: \"jest\",\n async config() {\n const config: Config.Argv = {\n $0: undefined as unknown as string,\n _: [],\n coverage: options.codeCoverage,\n bail: options.bail,\n cache: true,\n cacheDirectory: joinPaths(this.cachePath, \"jest\"),\n ci: options.ci,\n color: options.colors ?? true,\n debug: this.config.mode === \"development\",\n detectOpenHandles: options.detectOpenHandles,\n forceExit: options.forceExit,\n logHeapUsage: options.logHeapUsage,\n detectLeaks: options.detectLeaks,\n json: options.json,\n maxWorkers: options.maxWorkers,\n onlyChanged: options.onlyChanged,\n changedSince: options.changedSince,\n outputFile: options.outputFile,\n passWithNoTests: options.passWithNoTests,\n runInBand: options.runInBand,\n showConfig: options.showConfig,\n silent: options.silent,\n testLocationInResults: options.testLocationInResults,\n testNamePattern: options.testNamePattern,\n testPathPatterns: options.testPathPatterns,\n testPathIgnorePatterns: options.testPathIgnorePatterns,\n testTimeout: options.testTimeout,\n colors: options.colors ?? true,\n verbose: options.verbose,\n testResultsProcessor: options.testResultsProcessor,\n updateSnapshot: options.updateSnapshot,\n useStderr: options.useStderr,\n watch: options.watch,\n watchAll: options.watchAll,\n randomize: options.randomize\n };\n\n if (options.testFile) {\n config._.push(options.testFile);\n }\n\n if (options.findRelatedTests) {\n const parsedTests = options.findRelatedTests.map(s => s.trim());\n config._.push(...parsedTests);\n config.findRelatedTests = true;\n }\n\n if (options.coverageDirectory) {\n config.coverageDirectory = joinPaths(\n this.workspaceConfig.workspaceRoot,\n options.coverageDirectory\n );\n }\n\n if (options.clearCache) {\n config.clearCache = true;\n }\n\n if (options.reporters && options.reporters.length > 0) {\n config.reporters = options.reporters;\n }\n\n if (\n Array.isArray(options.coverageReporters) &&\n options.coverageReporters.length > 0\n ) {\n config.coverageReporters = options.coverageReporters;\n }\n\n return {\n test: {\n jest: config\n }\n } as Partial<JestPluginUserConfig>;\n },\n async test() {\n if (this.config.test.jest) {\n const { results } = await runCLI(this.config.test.jest, [\n joinPaths(this.workspaceConfig.workspaceRoot, this.config.root)\n ]);\n\n const snapshotResults = results.snapshot;\n const snapshotsAdded = snapshotResults.added;\n const snapshotsFailed = snapshotResults.unmatched;\n const snapshotsOutdated = snapshotResults.unchecked;\n const snapshotsFilesRemoved = snapshotResults.filesRemoved;\n const snapshotsDidUpdate = snapshotResults.didUpdate;\n const snapshotsPassed = snapshotResults.matched;\n const snapshotsTotal = snapshotResults.total;\n const snapshotsUpdated = snapshotResults.updated;\n const suitesFailed = results.numFailedTestSuites;\n const suitesPassed = results.numPassedTestSuites;\n const suitesPending = results.numPendingTestSuites;\n const suitesRun = suitesFailed + suitesPassed;\n const suitesTotal = results.testResults.length;\n const testsFailed = results.numFailedTests;\n const testsPassed = results.numPassedTests;\n const testsPending = results.numPendingTests;\n const testsTodo = results.numTodoTests;\n const testsTotal = results.numTotalTests;\n\n const suites = `${\n chalk.bold(\"Test Suites: \") +\n (suitesFailed\n ? `${chalk.bold(chalk.red(`${suitesFailed} failed`))}, `\n : \"\") +\n (suitesPending\n ? `${chalk.bold(chalk.yellow(`${suitesPending} skipped`))}, `\n : \"\") +\n (suitesPassed\n ? `${chalk.bold(chalk.green(`${suitesPassed} passed`))}, `\n : \"\") +\n (suitesRun !== suitesTotal\n ? `${suitesRun} of ${suitesTotal}`\n : suitesTotal)\n } total`;\n\n const tests = `${\n chalk.bold(\"Tests: \") +\n (testsFailed > 0\n ? `${chalk.bold(chalk.red(`${testsFailed} failed`))}, `\n : \"\") +\n (testsPending > 0\n ? `${chalk.bold(chalk.yellow(`${testsPending} skipped`))}, `\n : \"\") +\n (testsTodo > 0\n ? `${chalk.bold(chalk.magenta(`${testsTodo} todo`))}, `\n : \"\") +\n (testsPassed > 0\n ? `${chalk.bold(chalk.green(`${testsPassed} passed`))}, `\n : \"\")\n }${testsTotal} total`;\n\n const snapshots = `${\n chalk.bold(\"Snapshots: \") +\n (snapshotsFailed\n ? `${chalk.bold(chalk.red(`${snapshotsFailed} failed`))}, `\n : \"\") +\n (snapshotsOutdated && !snapshotsDidUpdate\n ? `${chalk.bold(chalk.yellow(`${snapshotsOutdated} obsolete`))}, `\n : \"\") +\n (snapshotsOutdated && snapshotsDidUpdate\n ? `${chalk.bold(chalk.green(`${snapshotsOutdated} removed`))}, `\n : \"\") +\n (snapshotsFilesRemoved && !snapshotsDidUpdate\n ? `${chalk.bold(\n chalk.yellow(\n `${pluralize(\"file\", snapshotsFilesRemoved)} obsolete`\n )\n )}, `\n : \"\") +\n (snapshotsFilesRemoved && snapshotsDidUpdate\n ? `${chalk.bold(\n chalk.green(\n `${pluralize(\"file\", snapshotsFilesRemoved)} removed`\n )\n )}, `\n : \"\") +\n (snapshotsUpdated\n ? `${chalk.bold(chalk.green(`${snapshotsUpdated} updated`))}, `\n : \"\") +\n (snapshotsAdded\n ? `${chalk.bold(chalk.green(`${snapshotsAdded} written`))}, `\n : \"\") +\n (snapshotsPassed\n ? `${chalk.bold(chalk.green(`${snapshotsPassed} passed`))}, `\n : \"\")\n }${snapshotsTotal} total`;\n\n this.info(\n `\n${chalk.bold(`Test result summary:`)}\n${suites}\n${tests}\n${snapshots}\n${chalk.bold(`Time:`)} ${formatTime((Date.now() - results.startTime) / 1000)}\n `\n );\n }\n }\n } as Plugin<TContext>;\n};\n\nexport default plugin;\n"],"mappings":";;;;;;;;;;;;AA4CA,MAAa,UACX,UAA6B,EAAE,KACV;AACrB,QAAO;EACL,MAAM;EACN,MAAM,SAAS;GACb,MAAMA,SAAsB;IAC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estPluginOptions, JestPluginResolvedConfig, JestPluginUserConfig, __ΩJestPluginContext, __ΩJestPluginOptions, __ΩJestPluginResolvedConfig, __ΩJestPluginUserConfig } from "./plugin.cjs";
2
- export { JestPluginContext, JestPluginOptions, JestPluginResolvedConfig, JestPluginUserConfig, __ΩJestPluginContext, __ΩJestPluginOptions, __ΩJestPluginResolvedConfig, __ΩJestPluginUserConfig };
@@ -1,2 +0,0 @@
1
- import { JestPluginContext, JestPluginOptions, JestPluginResolvedConfig, JestPluginUserConfig, __ΩJestPluginContext, __ΩJestPluginOptions, __ΩJestPluginResolvedConfig, __ΩJestPluginUserConfig } from "./plugin.mjs";
2
- export { JestPluginContext, JestPluginOptions, JestPluginResolvedConfig, JestPluginUserConfig, __ΩJestPluginContext, __ΩJestPluginOptions, __ΩJestPluginResolvedConfig, __ΩJestPluginUserConfig };
@@ -1,218 +0,0 @@
1
- import { PluginContext, ResolvedConfig, UserConfig } from "powerlines";
2
- import { Config } from "@jest/types";
3
-
4
- //#region src/types/plugin.d.ts
5
- interface JestPluginOptions {
6
- /**
7
- * Indicates that test coverage information should be collected and reported in the output.
8
- *
9
- * @see https://jestjs.io/docs/cli#--coverage
10
- */
11
- codeCoverage?: boolean;
12
- /**
13
- * 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.
14
- *
15
- * @see https://jestjs.io/docs/cli#--configpath
16
- */
17
- configFile?: string;
18
- /**
19
- * Attempt to collect and print open handles preventing Jest from exiting cleanly after all tests have completed.
20
- *
21
- * @see https://jestjs.io/docs/cli#--detectopenhandles
22
- */
23
- detectOpenHandles?: boolean;
24
- /**
25
- * Logs the heap usage after every test. Useful to debug memory leaks. Use together with --runInBand and --expose-gc in node.
26
- */
27
- logHeapUsage?: boolean;
28
- /**
29
- * **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
30
- */
31
- detectLeaks?: boolean;
32
- /**
33
- * The name of the file to test.
34
- */
35
- testFile?: string;
36
- /**
37
- * Exit the test suite immediately after `n` number of failing tests.
38
- *
39
- * @see https://jestjs.io/docs/cli#--bail
40
- */
41
- bail?: boolean | number;
42
- /**
43
- * Continuous Integration mode. If true, Jest will run tests once and exit.
44
- */
45
- ci?: boolean;
46
- /**
47
- * Enables colored output.
48
- */
49
- color?: boolean;
50
- /**
51
- * Deletes the Jest cache directory and then exits without running tests. Will delete Jest's default cache directory.
52
- */
53
- clearCache?: boolean;
54
- /**
55
- * Find and run the tests that cover a list of source files.
56
- *
57
- * @see https://jestjs.io/docs/cli#--findrelatedtests
58
- */
59
- findRelatedTests?: string[];
60
- /**
61
- * Force Jest to exit after all tests have completed running. This is useful when resources set up by test code cannot be adequately cleaned up.
62
- */
63
- forceExit?: boolean;
64
- /**
65
- * Enables JSON output.
66
- */
67
- json?: boolean;
68
- /**
69
- * 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)
70
- *
71
- * @see https://jestjs.io/docs/cli#--maxworkersnumberstring
72
- */
73
- maxWorkers?: number | string;
74
- /**
75
- * 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.
76
- *
77
- * @see https://jestjs.io/docs/cli#--onlychanged
78
- */
79
- onlyChanged?: boolean;
80
- /**
81
- * 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.
82
- *
83
- * @see https://jestjs.io/docs/cli#--changedsince
84
- */
85
- changedSince?: string;
86
- /**
87
- * The path to a JSON file that Jest should write test results to.
88
- */
89
- outputFile?: string;
90
- /**
91
- * Exit with code 0 even if no tests are found.
92
- *
93
- * @see https://jestjs.io/docs/cli#--passwithnotests
94
- *
95
- * @defaultValue true
96
- */
97
- passWithNoTests?: boolean;
98
- /**
99
- * Randomize the order of test execution
100
- */
101
- randomize?: boolean;
102
- /**
103
- * 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.
104
- *
105
- * @see https://jestjs.io/docs/cli#--runinband
106
- */
107
- runInBand?: boolean;
108
- /**
109
- * Print your Jest config and then exits.
110
- *
111
- * @see https://jestjs.io/docs/cli#--showconfig
112
- */
113
- showConfig?: boolean;
114
- /**
115
- * Prevent tests from printing messages through the console.
116
- *
117
- * @see https://jestjs.io/docs/cli#--silent
118
- */
119
- silent?: boolean;
120
- /**
121
- * Run only tests with a name that matches the regex pattern.
122
- *
123
- * @see https://jestjs.io/docs/cli#--testnamepatternregex
124
- */
125
- testNamePattern?: string;
126
- /**
127
- * 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.
128
- *
129
- * @see https://jestjs.io/docs/cli#--testpathignorepatternsregex
130
- */
131
- testPathIgnorePatterns?: string[];
132
- /**
133
- * An array of regexp pattern strings that is matched against all tests paths before executing the test. Only run tests with a path that matches the provided regexp expressions.
134
- *
135
- * @see https://jestjs.io/docs/cli#--testpathpatternsregex
136
- */
137
- testPathPatterns?: string[];
138
- /**
139
- * Enables colored output.
140
- */
141
- colors?: boolean;
142
- /**
143
- * A list of reporters to use for test results
144
- */
145
- reporters?: string[];
146
- /**
147
- * Display individual test results with the test suite hierarchy.
148
- *
149
- * @see https://jestjs.io/docs/cli#--verbose
150
- */
151
- verbose?: boolean;
152
- /**
153
- * A list of coverage reporters to use
154
- */
155
- coverageReporters?: string[];
156
- /**
157
- * The directory where Jest should output its coverage files.
158
- */
159
- coverageDirectory?: string;
160
- /**
161
- * A Node module that implements a custom results processor.
162
- */
163
- testResultsProcessor?: string;
164
- /**
165
- * Update snapshots during this test run.
166
- */
167
- updateSnapshot?: boolean;
168
- /**
169
- * Divert all output to stderr.
170
- */
171
- useStderr?: boolean;
172
- /**
173
- * Watch files for changes and rerun tests related to changed files.
174
- */
175
- watch?: boolean;
176
- /**
177
- * Watch files for changes and rerun all tests when something changes.
178
- */
179
- watchAll?: boolean;
180
- /**
181
- * Adds a location field to test results. Used to report location of a test in a reporter. Example: `{ "column": 4, "line": 5 }`.
182
- *
183
- * @see https://jestjs.io/docs/cli#--testlocationinresultsboolean
184
- */
185
- testLocationInResults?: boolean;
186
- /**
187
- * Default timeout of a test in milliseconds.
188
- *
189
- * @see https://jestjs.io/docs/cli#--testtimeoutmilliseconds
190
- *
191
- * @defaultValue 5000
192
- */
193
- testTimeout?: number;
194
- }
195
- interface JestPluginUserConfig extends UserConfig {
196
- test: {
197
- /**
198
- * Jest transformation options
199
- */
200
- jest: Config.Argv;
201
- };
202
- }
203
- interface JestPluginResolvedConfig extends ResolvedConfig {
204
- test: {
205
- /**
206
- * Resolved Jest transformation options
207
- */
208
- jest: Config.Argv;
209
- };
210
- }
211
- type JestPluginContext<TResolvedConfig extends JestPluginResolvedConfig = JestPluginResolvedConfig> = PluginContext<TResolvedConfig>;
212
- declare type __ΩJestPluginOptions = any[];
213
- declare type __ΩJestPluginUserConfig = any[];
214
- declare type __ΩJestPluginResolvedConfig = any[];
215
- declare type __ΩJestPluginContext = any[];
216
- //#endregion
217
- export { JestPluginContext, JestPluginOptions, JestPluginResolvedConfig, JestPluginUserConfig, __ΩJestPluginContext, __ΩJestPluginOptions, __ΩJestPluginResolvedConfig, __ΩJestPluginUserConfig };
218
- //# sourceMappingURL=plugin.d.cts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"plugin.d.cts","names":[],"sources":["../../src/types/plugin.ts"],"sourcesContent":[],"mappings":";;;;UAqBiB,iBAAA;;AAAjB;AAmOA;AASA;AASA;EAC0B,YAAA,CAAA,EAAA,OAAA;EAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAnBpC,oBAAA,SAA6B;;;;;UAKpC,MAAA,CAAO;;;UAIA,wBAAA,SAAiC;;;;;UAKxC,MAAA,CAAO;;;KAIL,0CACc,2BAA2B,4BACjD,cAAc"}
@@ -1,218 +0,0 @@
1
- import { PluginContext, ResolvedConfig, UserConfig } from "powerlines";
2
- import { Config } from "@jest/types";
3
-
4
- //#region src/types/plugin.d.ts
5
- interface JestPluginOptions {
6
- /**
7
- * Indicates that test coverage information should be collected and reported in the output.
8
- *
9
- * @see https://jestjs.io/docs/cli#--coverage
10
- */
11
- codeCoverage?: boolean;
12
- /**
13
- * 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.
14
- *
15
- * @see https://jestjs.io/docs/cli#--configpath
16
- */
17
- configFile?: string;
18
- /**
19
- * Attempt to collect and print open handles preventing Jest from exiting cleanly after all tests have completed.
20
- *
21
- * @see https://jestjs.io/docs/cli#--detectopenhandles
22
- */
23
- detectOpenHandles?: boolean;
24
- /**
25
- * Logs the heap usage after every test. Useful to debug memory leaks. Use together with --runInBand and --expose-gc in node.
26
- */
27
- logHeapUsage?: boolean;
28
- /**
29
- * **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
30
- */
31
- detectLeaks?: boolean;
32
- /**
33
- * The name of the file to test.
34
- */
35
- testFile?: string;
36
- /**
37
- * Exit the test suite immediately after `n` number of failing tests.
38
- *
39
- * @see https://jestjs.io/docs/cli#--bail
40
- */
41
- bail?: boolean | number;
42
- /**
43
- * Continuous Integration mode. If true, Jest will run tests once and exit.
44
- */
45
- ci?: boolean;
46
- /**
47
- * Enables colored output.
48
- */
49
- color?: boolean;
50
- /**
51
- * Deletes the Jest cache directory and then exits without running tests. Will delete Jest's default cache directory.
52
- */
53
- clearCache?: boolean;
54
- /**
55
- * Find and run the tests that cover a list of source files.
56
- *
57
- * @see https://jestjs.io/docs/cli#--findrelatedtests
58
- */
59
- findRelatedTests?: string[];
60
- /**
61
- * Force Jest to exit after all tests have completed running. This is useful when resources set up by test code cannot be adequately cleaned up.
62
- */
63
- forceExit?: boolean;
64
- /**
65
- * Enables JSON output.
66
- */
67
- json?: boolean;
68
- /**
69
- * 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)
70
- *
71
- * @see https://jestjs.io/docs/cli#--maxworkersnumberstring
72
- */
73
- maxWorkers?: number | string;
74
- /**
75
- * 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.
76
- *
77
- * @see https://jestjs.io/docs/cli#--onlychanged
78
- */
79
- onlyChanged?: boolean;
80
- /**
81
- * 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.
82
- *
83
- * @see https://jestjs.io/docs/cli#--changedsince
84
- */
85
- changedSince?: string;
86
- /**
87
- * The path to a JSON file that Jest should write test results to.
88
- */
89
- outputFile?: string;
90
- /**
91
- * Exit with code 0 even if no tests are found.
92
- *
93
- * @see https://jestjs.io/docs/cli#--passwithnotests
94
- *
95
- * @defaultValue true
96
- */
97
- passWithNoTests?: boolean;
98
- /**
99
- * Randomize the order of test execution
100
- */
101
- randomize?: boolean;
102
- /**
103
- * 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.
104
- *
105
- * @see https://jestjs.io/docs/cli#--runinband
106
- */
107
- runInBand?: boolean;
108
- /**
109
- * Print your Jest config and then exits.
110
- *
111
- * @see https://jestjs.io/docs/cli#--showconfig
112
- */
113
- showConfig?: boolean;
114
- /**
115
- * Prevent tests from printing messages through the console.
116
- *
117
- * @see https://jestjs.io/docs/cli#--silent
118
- */
119
- silent?: boolean;
120
- /**
121
- * Run only tests with a name that matches the regex pattern.
122
- *
123
- * @see https://jestjs.io/docs/cli#--testnamepatternregex
124
- */
125
- testNamePattern?: string;
126
- /**
127
- * 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.
128
- *
129
- * @see https://jestjs.io/docs/cli#--testpathignorepatternsregex
130
- */
131
- testPathIgnorePatterns?: string[];
132
- /**
133
- * An array of regexp pattern strings that is matched against all tests paths before executing the test. Only run tests with a path that matches the provided regexp expressions.
134
- *
135
- * @see https://jestjs.io/docs/cli#--testpathpatternsregex
136
- */
137
- testPathPatterns?: string[];
138
- /**
139
- * Enables colored output.
140
- */
141
- colors?: boolean;
142
- /**
143
- * A list of reporters to use for test results
144
- */
145
- reporters?: string[];
146
- /**
147
- * Display individual test results with the test suite hierarchy.
148
- *
149
- * @see https://jestjs.io/docs/cli#--verbose
150
- */
151
- verbose?: boolean;
152
- /**
153
- * A list of coverage reporters to use
154
- */
155
- coverageReporters?: string[];
156
- /**
157
- * The directory where Jest should output its coverage files.
158
- */
159
- coverageDirectory?: string;
160
- /**
161
- * A Node module that implements a custom results processor.
162
- */
163
- testResultsProcessor?: string;
164
- /**
165
- * Update snapshots during this test run.
166
- */
167
- updateSnapshot?: boolean;
168
- /**
169
- * Divert all output to stderr.
170
- */
171
- useStderr?: boolean;
172
- /**
173
- * Watch files for changes and rerun tests related to changed files.
174
- */
175
- watch?: boolean;
176
- /**
177
- * Watch files for changes and rerun all tests when something changes.
178
- */
179
- watchAll?: boolean;
180
- /**
181
- * Adds a location field to test results. Used to report location of a test in a reporter. Example: `{ "column": 4, "line": 5 }`.
182
- *
183
- * @see https://jestjs.io/docs/cli#--testlocationinresultsboolean
184
- */
185
- testLocationInResults?: boolean;
186
- /**
187
- * Default timeout of a test in milliseconds.
188
- *
189
- * @see https://jestjs.io/docs/cli#--testtimeoutmilliseconds
190
- *
191
- * @defaultValue 5000
192
- */
193
- testTimeout?: number;
194
- }
195
- interface JestPluginUserConfig extends UserConfig {
196
- test: {
197
- /**
198
- * Jest transformation options
199
- */
200
- jest: Config.Argv;
201
- };
202
- }
203
- interface JestPluginResolvedConfig extends ResolvedConfig {
204
- test: {
205
- /**
206
- * Resolved Jest transformation options
207
- */
208
- jest: Config.Argv;
209
- };
210
- }
211
- type JestPluginContext<TResolvedConfig extends JestPluginResolvedConfig = JestPluginResolvedConfig> = PluginContext<TResolvedConfig>;
212
- declare type __ΩJestPluginOptions = any[];
213
- declare type __ΩJestPluginUserConfig = any[];
214
- declare type __ΩJestPluginResolvedConfig = any[];
215
- declare type __ΩJestPluginContext = any[];
216
- //#endregion
217
- export { JestPluginContext, JestPluginOptions, JestPluginResolvedConfig, JestPluginUserConfig, __ΩJestPluginContext, __ΩJestPluginOptions, __ΩJestPluginResolvedConfig, __ΩJestPluginUserConfig };
218
- //# sourceMappingURL=plugin.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"plugin.d.mts","names":[],"sources":["../../src/types/plugin.ts"],"sourcesContent":[],"mappings":";;;;UAqBiB,iBAAA;;AAAjB;AAmOA;AASA;AASA;EAC0B,YAAA,CAAA,EAAA,OAAA;EAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAnBpC,oBAAA,SAA6B;;;;;UAKpC,MAAA,CAAO;;;UAIA,wBAAA,SAAiC;;;;;UAKxC,MAAA,CAAO;;;KAIL,0CACc,2BAA2B,4BACjD,cAAc"}