@powerlines/plugin-jest 0.1.261 → 0.1.263
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/_virtual/rolldown_runtime.cjs +29 -0
- package/dist/index.cjs +2 -30
- package/dist/index.d.cts +2 -2
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +0 -2
- package/dist/index.mjs.map +1 -1
- package/dist/types/index.cjs +0 -2
- package/dist/types/index.d.cts +1 -2
- package/dist/types/index.d.mts +1 -2
- package/dist/types/index.mjs +0 -3
- package/dist/types/plugin.cjs +0 -1
- package/dist/types/plugin.d.cts +220 -2
- package/dist/types/plugin.d.cts.map +1 -0
- package/dist/types/plugin.d.mts +220 -2
- package/dist/types/plugin.d.mts.map +1 -0
- package/dist/types/plugin.mjs +0 -2
- package/package.json +4 -4
- package/dist/index-BgAdqTbb.d.mts +0 -1
- package/dist/index-CEgs-Dz2.d.cts +0 -1
- package/dist/plugin-C3MaN5jp.mjs +0 -1
- package/dist/plugin-C9y4arek.d.mts +0 -220
- package/dist/plugin-C9y4arek.d.mts.map +0 -1
- package/dist/plugin-DHXHjv16.cjs +0 -0
- package/dist/plugin-p47uTOgH.d.cts +0 -220
- package/dist/plugin-p47uTOgH.d.cts.map +0 -1
- package/dist/types-CTUnla4x.mjs +0 -1
- package/dist/types-DHkg7xmX.cjs +0 -0
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
//#region rolldown:runtime
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __copyProps = (to, from, except, desc) => {
|
|
9
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
10
|
+
for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
11
|
+
key = keys[i];
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except) {
|
|
13
|
+
__defProp(to, key, {
|
|
14
|
+
get: ((k) => from[k]).bind(null, key),
|
|
15
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
return to;
|
|
21
|
+
};
|
|
22
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
23
|
+
value: mod,
|
|
24
|
+
enumerable: true
|
|
25
|
+
}) : target, mod));
|
|
26
|
+
|
|
27
|
+
//#endregion
|
|
28
|
+
|
|
29
|
+
exports.__toESM = __toESM;
|
package/dist/index.cjs
CHANGED
|
@@ -1,36 +1,8 @@
|
|
|
1
1
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
2
|
-
|
|
3
|
-
var __create = Object.create;
|
|
4
|
-
var __defProp = Object.defineProperty;
|
|
5
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
8
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
-
var __copyProps = (to, from, except, desc) => {
|
|
10
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
-
for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
12
|
-
key = keys[i];
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except) {
|
|
14
|
-
__defProp(to, key, {
|
|
15
|
-
get: ((k) => from[k]).bind(null, key),
|
|
16
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
return to;
|
|
22
|
-
};
|
|
23
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
24
|
-
value: mod,
|
|
25
|
-
enumerable: true
|
|
26
|
-
}) : target, mod));
|
|
27
|
-
|
|
28
|
-
//#endregion
|
|
29
|
-
require('./plugin-DHXHjv16.cjs');
|
|
30
|
-
require('./types-DHkg7xmX.cjs');
|
|
2
|
+
const require_rolldown_runtime = require('./_virtual/rolldown_runtime.cjs');
|
|
31
3
|
let __stryke_path_join = require("@stryke/path/join");
|
|
32
4
|
let chalk = require("chalk");
|
|
33
|
-
chalk = __toESM(chalk);
|
|
5
|
+
chalk = require_rolldown_runtime.__toESM(chalk);
|
|
34
6
|
let jest = require("jest");
|
|
35
7
|
let jest_util = require("jest-util");
|
|
36
8
|
|
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "./index
|
|
1
|
+
import { JestPluginContext, JestPluginOptions, JestPluginResolvedConfig, JestPluginUserConfig, __ΩJestPluginContext, __ΩJestPluginOptions, __ΩJestPluginResolvedConfig, __ΩJestPluginUserConfig } from "./types/plugin.cjs";
|
|
2
|
+
import "./types/index.cjs";
|
|
3
3
|
import { Plugin } from "powerlines/types/plugin";
|
|
4
4
|
|
|
5
5
|
//#region src/index.d.ts
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "./index
|
|
1
|
+
import { JestPluginContext, JestPluginOptions, JestPluginResolvedConfig, JestPluginUserConfig, __ΩJestPluginContext, __ΩJestPluginOptions, __ΩJestPluginResolvedConfig, __ΩJestPluginUserConfig } from "./types/plugin.mjs";
|
|
2
|
+
import "./types/index.mjs";
|
|
3
3
|
import { Plugin } from "powerlines/types/plugin";
|
|
4
4
|
|
|
5
5
|
//#region src/index.d.ts
|
package/dist/index.mjs
CHANGED
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
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/types/plugin\";\nimport {\n JestPluginContext,\n JestPluginOptions,\n JestPluginUserConfig\n} from \"./types/plugin\";\n\nexport * from \"./types\";\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.projectRoot)\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":";;;;;;;;;;;;;;AAsCA,MAAa,UACX,UAA6B,EAAE,KACV;AACrB,QAAO;EACL,MAAM;EACN,MAAM,SAAS;GACb,MAAMA,SAAsB;IAC1B,IAAI;IACJ,GAAG,EAAE;IACL,UAAU,QAAQ;IAClB,MAAM,QAAQ;IACd,OAAO;IACP,gBAAgB,UAAU,KAAK,WAAW,OAAO;IACjD,IAAI,QAAQ;IACZ,OAAO,QAAQ,UAAU;IACzB,OAAO,KAAK,OAAO,SAAS;IAC5B,mBAAmB,QAAQ;IAC3B,WAAW,QAAQ;IACnB,cAAc,QAAQ;IACtB,aAAa,QAAQ;IACrB,MAAM,QAAQ;IACd,YAAY,QAAQ;IACpB,aAAa,QAAQ;IACrB,cAAc,QAAQ;IACtB,YAAY,QAAQ;IACpB,iBAAiB,QAAQ;IACzB,WAAW,QAAQ;IACnB,YAAY,QAAQ;IACpB,QAAQ,QAAQ;IAChB,uBAAuB,QAAQ;IAC/B,iBAAiB,QAAQ;IACzB,kBAAkB,QAAQ;IAC1B,wBAAwB,QAAQ;IAChC,aAAa,QAAQ;IACrB,QAAQ,QAAQ,UAAU;IAC1B,SAAS,QAAQ;IACjB,sBAAsB,QAAQ;IAC9B,gBAAgB,QAAQ;IACxB,WAAW,QAAQ;IACnB,OAAO,QAAQ;IACf,UAAU,QAAQ;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U,QAAQ,sBAAsB,CAAC,UAC7C,CACF,CAAC,MACF,OACH,mBACG,GAAG,MAAM,KAAK,MAAM,MAAM,GAAG,iBAAiB,UAAU,CAAC,CAAC,MAC1D,OACH,iBACG,GAAG,MAAM,KAAK,MAAM,MAAM,GAAG,eAAe,UAAU,CAAC,CAAC,MACxD,OACH,kBACG,GAAG,MAAM,KAAK,MAAM,MAAM,GAAG,gBAAgB,SAAS,CAAC,CAAC,MACxD,MACH,eAAe;AAElB,SAAK,KACH;EACR,MAAM,KAAK,uBAAuB,CAAC;EACnC,OAAO;EACP,MAAM;EACN,UAAU;EACV,MAAM,KAAK,QAAQ,CAAC,UAAU,YAAY,KAAK,KAAK,GAAG,QAAQ,aAAa,IAAK,CAAC;QAE3E;;;EAGN;;AAGH,kBAAe"}
|
|
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/types/plugin\";\nimport {\n JestPluginContext,\n JestPluginOptions,\n JestPluginUserConfig\n} from \"./types/plugin\";\n\nexport * from \"./types\";\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.projectRoot)\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":";;;;;;;;;;;;AAsCA,MAAa,UACX,UAA6B,EAAE,KACV;AACrB,QAAO;EACL,MAAM;EACN,MAAM,SAAS;GACb,MAAMA,SAAsB;IAC1B,IAAI;IACJ,GAAG,EAAE;IACL,UAAU,QAAQ;IAClB,MAAM,QAAQ;IACd,OAAO;IACP,gBAAgB,UAAU,KAAK,WAAW,OAAO;IACjD,IAAI,QAAQ;IACZ,OAAO,QAAQ,UAAU;IACzB,OAAO,KAAK,OAAO,SAAS;IAC5B,mBAAmB,QAAQ;IAC3B,WAAW,QAAQ;IACnB,cAAc,QAAQ;IACtB,aAAa,QAAQ;IACrB,MAAM,QAAQ;IACd,YAAY,QAAQ;IACpB,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BAAgB,SAAS,CAAC,CAAC,MACtD,OACH,qBAAqB,CAAC,qBACnB,GAAG,MAAM,KAAK,MAAM,OAAO,GAAG,kBAAkB,WAAW,CAAC,CAAC,MAC7D,OACH,qBAAqB,qBAClB,GAAG,MAAM,KAAK,MAAM,MAAM,GAAG,kBAAkB,UAAU,CAAC,CAAC,MAC3D,OACH,yBAAyB,CAAC,qBACvB,GAAG,MAAM,KACP,MAAM,OACJ,GAAG,UAAU,QAAQ,sBAAsB,CAAC,WAC7C,CACF,CAAC,MACF,OACH,yBAAyB,qBACtB,GAAG,MAAM,KACP,MAAM,MACJ,GAAG,UAAU,QAAQ,sBAAsB,CAAC,UAC7C,CACF,CAAC,MACF,OACH,mBACG,GAAG,MAAM,KAAK,MAAM,MAAM,GAAG,iBAAiB,UAAU,CAAC,CAAC,MAC1D,OACH,iBACG,GAAG,MAAM,KAAK,MAAM,MAAM,GAAG,eAAe,UAAU,CAAC,CAAC,MACxD,OACH,kBACG,GAAG,MAAM,KAAK,MAAM,MAAM,GAAG,gBAAgB,SAAS,CAAC,CAAC,MACxD,MACH,eAAe;AAElB,SAAK,KACH;EACR,MAAM,KAAK,uBAAuB,CAAC;EACnC,OAAO;EACP,MAAM;EACN,UAAU;EACV,MAAM,KAAK,QAAQ,CAAC,UAAU,YAAY,KAAK,KAAK,GAAG,QAAQ,aAAa,IAAK,CAAC;QAE3E;;;EAGN;;AAGH,kBAAe"}
|
package/dist/types/index.cjs
CHANGED
package/dist/types/index.d.cts
CHANGED
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "../index-CEgs-Dz2.cjs";
|
|
1
|
+
import { JestPluginContext, JestPluginOptions, JestPluginResolvedConfig, JestPluginUserConfig, __ΩJestPluginContext, __ΩJestPluginOptions, __ΩJestPluginResolvedConfig, __ΩJestPluginUserConfig } from "./plugin.cjs";
|
|
3
2
|
export { JestPluginContext, JestPluginOptions, JestPluginResolvedConfig, JestPluginUserConfig, __ΩJestPluginContext, __ΩJestPluginOptions, __ΩJestPluginResolvedConfig, __ΩJestPluginUserConfig };
|
package/dist/types/index.d.mts
CHANGED
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "../index-BgAdqTbb.mjs";
|
|
1
|
+
import { JestPluginContext, JestPluginOptions, JestPluginResolvedConfig, JestPluginUserConfig, __ΩJestPluginContext, __ΩJestPluginOptions, __ΩJestPluginResolvedConfig, __ΩJestPluginUserConfig } from "./plugin.mjs";
|
|
3
2
|
export { JestPluginContext, JestPluginOptions, JestPluginResolvedConfig, JestPluginUserConfig, __ΩJestPluginContext, __ΩJestPluginOptions, __ΩJestPluginResolvedConfig, __ΩJestPluginUserConfig };
|
package/dist/types/index.mjs
CHANGED
package/dist/types/plugin.cjs
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
require('../plugin-DHXHjv16.cjs');
|
package/dist/types/plugin.d.cts
CHANGED
|
@@ -1,2 +1,220 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { Config } from "@jest/types";
|
|
2
|
+
import { UserConfig } from "powerlines/types/config";
|
|
3
|
+
import { PluginContext } from "powerlines/types/context";
|
|
4
|
+
import { ResolvedConfig } from "powerlines/types/resolved";
|
|
5
|
+
|
|
6
|
+
//#region src/types/plugin.d.ts
|
|
7
|
+
interface JestPluginOptions {
|
|
8
|
+
/**
|
|
9
|
+
* Indicates that test coverage information should be collected and reported in the output.
|
|
10
|
+
*
|
|
11
|
+
* @see https://jestjs.io/docs/cli#--coverage
|
|
12
|
+
*/
|
|
13
|
+
codeCoverage?: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* 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.
|
|
16
|
+
*
|
|
17
|
+
* @see https://jestjs.io/docs/cli#--configpath
|
|
18
|
+
*/
|
|
19
|
+
configFile?: string;
|
|
20
|
+
/**
|
|
21
|
+
* Attempt to collect and print open handles preventing Jest from exiting cleanly after all tests have completed.
|
|
22
|
+
*
|
|
23
|
+
* @see https://jestjs.io/docs/cli#--detectopenhandles
|
|
24
|
+
*/
|
|
25
|
+
detectOpenHandles?: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* Logs the heap usage after every test. Useful to debug memory leaks. Use together with --runInBand and --expose-gc in node.
|
|
28
|
+
*/
|
|
29
|
+
logHeapUsage?: boolean;
|
|
30
|
+
/**
|
|
31
|
+
* **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
|
|
32
|
+
*/
|
|
33
|
+
detectLeaks?: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* The name of the file to test.
|
|
36
|
+
*/
|
|
37
|
+
testFile?: string;
|
|
38
|
+
/**
|
|
39
|
+
* Exit the test suite immediately after `n` number of failing tests.
|
|
40
|
+
*
|
|
41
|
+
* @see https://jestjs.io/docs/cli#--bail
|
|
42
|
+
*/
|
|
43
|
+
bail?: boolean | number;
|
|
44
|
+
/**
|
|
45
|
+
* Continuous Integration mode. If true, Jest will run tests once and exit.
|
|
46
|
+
*/
|
|
47
|
+
ci?: boolean;
|
|
48
|
+
/**
|
|
49
|
+
* Enables colored output.
|
|
50
|
+
*/
|
|
51
|
+
color?: boolean;
|
|
52
|
+
/**
|
|
53
|
+
* Deletes the Jest cache directory and then exits without running tests. Will delete Jest's default cache directory.
|
|
54
|
+
*/
|
|
55
|
+
clearCache?: boolean;
|
|
56
|
+
/**
|
|
57
|
+
* Find and run the tests that cover a list of source files.
|
|
58
|
+
*
|
|
59
|
+
* @see https://jestjs.io/docs/cli#--findrelatedtests
|
|
60
|
+
*/
|
|
61
|
+
findRelatedTests?: string[];
|
|
62
|
+
/**
|
|
63
|
+
* 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.
|
|
64
|
+
*/
|
|
65
|
+
forceExit?: boolean;
|
|
66
|
+
/**
|
|
67
|
+
* Enables JSON output.
|
|
68
|
+
*/
|
|
69
|
+
json?: boolean;
|
|
70
|
+
/**
|
|
71
|
+
* 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)
|
|
72
|
+
*
|
|
73
|
+
* @see https://jestjs.io/docs/cli#--maxworkersnumberstring
|
|
74
|
+
*/
|
|
75
|
+
maxWorkers?: number | string;
|
|
76
|
+
/**
|
|
77
|
+
* 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.
|
|
78
|
+
*
|
|
79
|
+
* @see https://jestjs.io/docs/cli#--onlychanged
|
|
80
|
+
*/
|
|
81
|
+
onlyChanged?: boolean;
|
|
82
|
+
/**
|
|
83
|
+
* 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.
|
|
84
|
+
*
|
|
85
|
+
* @see https://jestjs.io/docs/cli#--changedsince
|
|
86
|
+
*/
|
|
87
|
+
changedSince?: string;
|
|
88
|
+
/**
|
|
89
|
+
* The path to a JSON file that Jest should write test results to.
|
|
90
|
+
*/
|
|
91
|
+
outputFile?: string;
|
|
92
|
+
/**
|
|
93
|
+
* Exit with code 0 even if no tests are found.
|
|
94
|
+
*
|
|
95
|
+
* @see https://jestjs.io/docs/cli#--passwithnotests
|
|
96
|
+
*
|
|
97
|
+
* @defaultValue true
|
|
98
|
+
*/
|
|
99
|
+
passWithNoTests?: boolean;
|
|
100
|
+
/**
|
|
101
|
+
* Randomize the order of test execution
|
|
102
|
+
*/
|
|
103
|
+
randomize?: boolean;
|
|
104
|
+
/**
|
|
105
|
+
* 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.
|
|
106
|
+
*
|
|
107
|
+
* @see https://jestjs.io/docs/cli#--runinband
|
|
108
|
+
*/
|
|
109
|
+
runInBand?: boolean;
|
|
110
|
+
/**
|
|
111
|
+
* Print your Jest config and then exits.
|
|
112
|
+
*
|
|
113
|
+
* @see https://jestjs.io/docs/cli#--showconfig
|
|
114
|
+
*/
|
|
115
|
+
showConfig?: boolean;
|
|
116
|
+
/**
|
|
117
|
+
* Prevent tests from printing messages through the console.
|
|
118
|
+
*
|
|
119
|
+
* @see https://jestjs.io/docs/cli#--silent
|
|
120
|
+
*/
|
|
121
|
+
silent?: boolean;
|
|
122
|
+
/**
|
|
123
|
+
* Run only tests with a name that matches the regex pattern.
|
|
124
|
+
*
|
|
125
|
+
* @see https://jestjs.io/docs/cli#--testnamepatternregex
|
|
126
|
+
*/
|
|
127
|
+
testNamePattern?: string;
|
|
128
|
+
/**
|
|
129
|
+
* 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.
|
|
130
|
+
*
|
|
131
|
+
* @see https://jestjs.io/docs/cli#--testpathignorepatternsregex
|
|
132
|
+
*/
|
|
133
|
+
testPathIgnorePatterns?: string[];
|
|
134
|
+
/**
|
|
135
|
+
* 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.
|
|
136
|
+
*
|
|
137
|
+
* @see https://jestjs.io/docs/cli#--testpathpatternsregex
|
|
138
|
+
*/
|
|
139
|
+
testPathPatterns?: string[];
|
|
140
|
+
/**
|
|
141
|
+
* Enables colored output.
|
|
142
|
+
*/
|
|
143
|
+
colors?: boolean;
|
|
144
|
+
/**
|
|
145
|
+
* A list of reporters to use for test results
|
|
146
|
+
*/
|
|
147
|
+
reporters?: string[];
|
|
148
|
+
/**
|
|
149
|
+
* Display individual test results with the test suite hierarchy.
|
|
150
|
+
*
|
|
151
|
+
* @see https://jestjs.io/docs/cli#--verbose
|
|
152
|
+
*/
|
|
153
|
+
verbose?: boolean;
|
|
154
|
+
/**
|
|
155
|
+
* A list of coverage reporters to use
|
|
156
|
+
*/
|
|
157
|
+
coverageReporters?: string[];
|
|
158
|
+
/**
|
|
159
|
+
* The directory where Jest should output its coverage files.
|
|
160
|
+
*/
|
|
161
|
+
coverageDirectory?: string;
|
|
162
|
+
/**
|
|
163
|
+
* A Node module that implements a custom results processor.
|
|
164
|
+
*/
|
|
165
|
+
testResultsProcessor?: string;
|
|
166
|
+
/**
|
|
167
|
+
* Update snapshots during this test run.
|
|
168
|
+
*/
|
|
169
|
+
updateSnapshot?: boolean;
|
|
170
|
+
/**
|
|
171
|
+
* Divert all output to stderr.
|
|
172
|
+
*/
|
|
173
|
+
useStderr?: boolean;
|
|
174
|
+
/**
|
|
175
|
+
* Watch files for changes and rerun tests related to changed files.
|
|
176
|
+
*/
|
|
177
|
+
watch?: boolean;
|
|
178
|
+
/**
|
|
179
|
+
* Watch files for changes and rerun all tests when something changes.
|
|
180
|
+
*/
|
|
181
|
+
watchAll?: boolean;
|
|
182
|
+
/**
|
|
183
|
+
* Adds a location field to test results. Used to report location of a test in a reporter. Example: `{ "column": 4, "line": 5 }`.
|
|
184
|
+
*
|
|
185
|
+
* @see https://jestjs.io/docs/cli#--testlocationinresultsboolean
|
|
186
|
+
*/
|
|
187
|
+
testLocationInResults?: boolean;
|
|
188
|
+
/**
|
|
189
|
+
* Default timeout of a test in milliseconds.
|
|
190
|
+
*
|
|
191
|
+
* @see https://jestjs.io/docs/cli#--testtimeoutmilliseconds
|
|
192
|
+
*
|
|
193
|
+
* @defaultValue 5000
|
|
194
|
+
*/
|
|
195
|
+
testTimeout?: number;
|
|
196
|
+
}
|
|
197
|
+
interface JestPluginUserConfig extends UserConfig {
|
|
198
|
+
test: {
|
|
199
|
+
/**
|
|
200
|
+
* Jest transformation options
|
|
201
|
+
*/
|
|
202
|
+
jest: Config.Argv;
|
|
203
|
+
};
|
|
204
|
+
}
|
|
205
|
+
interface JestPluginResolvedConfig extends ResolvedConfig {
|
|
206
|
+
test: {
|
|
207
|
+
/**
|
|
208
|
+
* Resolved Jest transformation options
|
|
209
|
+
*/
|
|
210
|
+
jest: Config.Argv;
|
|
211
|
+
};
|
|
212
|
+
}
|
|
213
|
+
type JestPluginContext<TResolvedConfig extends JestPluginResolvedConfig = JestPluginResolvedConfig> = PluginContext<TResolvedConfig>;
|
|
214
|
+
declare type __ΩJestPluginOptions = any[];
|
|
215
|
+
declare type __ΩJestPluginUserConfig = any[];
|
|
216
|
+
declare type __ΩJestPluginResolvedConfig = any[];
|
|
217
|
+
declare type __ΩJestPluginContext = any[];
|
|
218
|
+
//#endregion
|
|
219
|
+
export { JestPluginContext, JestPluginOptions, JestPluginResolvedConfig, JestPluginUserConfig, __ΩJestPluginContext, __ΩJestPluginOptions, __ΩJestPluginResolvedConfig, __ΩJestPluginUserConfig };
|
|
220
|
+
//# sourceMappingURL=plugin.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin.d.cts","names":[],"sources":["../../src/types/plugin.ts"],"sourcesContent":[],"mappings":";;;;;;UAuBiB,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"}
|
package/dist/types/plugin.d.mts
CHANGED
|
@@ -1,2 +1,220 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { Config } from "@jest/types";
|
|
2
|
+
import { UserConfig } from "powerlines/types/config";
|
|
3
|
+
import { PluginContext } from "powerlines/types/context";
|
|
4
|
+
import { ResolvedConfig } from "powerlines/types/resolved";
|
|
5
|
+
|
|
6
|
+
//#region src/types/plugin.d.ts
|
|
7
|
+
interface JestPluginOptions {
|
|
8
|
+
/**
|
|
9
|
+
* Indicates that test coverage information should be collected and reported in the output.
|
|
10
|
+
*
|
|
11
|
+
* @see https://jestjs.io/docs/cli#--coverage
|
|
12
|
+
*/
|
|
13
|
+
codeCoverage?: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* 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.
|
|
16
|
+
*
|
|
17
|
+
* @see https://jestjs.io/docs/cli#--configpath
|
|
18
|
+
*/
|
|
19
|
+
configFile?: string;
|
|
20
|
+
/**
|
|
21
|
+
* Attempt to collect and print open handles preventing Jest from exiting cleanly after all tests have completed.
|
|
22
|
+
*
|
|
23
|
+
* @see https://jestjs.io/docs/cli#--detectopenhandles
|
|
24
|
+
*/
|
|
25
|
+
detectOpenHandles?: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* Logs the heap usage after every test. Useful to debug memory leaks. Use together with --runInBand and --expose-gc in node.
|
|
28
|
+
*/
|
|
29
|
+
logHeapUsage?: boolean;
|
|
30
|
+
/**
|
|
31
|
+
* **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
|
|
32
|
+
*/
|
|
33
|
+
detectLeaks?: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* The name of the file to test.
|
|
36
|
+
*/
|
|
37
|
+
testFile?: string;
|
|
38
|
+
/**
|
|
39
|
+
* Exit the test suite immediately after `n` number of failing tests.
|
|
40
|
+
*
|
|
41
|
+
* @see https://jestjs.io/docs/cli#--bail
|
|
42
|
+
*/
|
|
43
|
+
bail?: boolean | number;
|
|
44
|
+
/**
|
|
45
|
+
* Continuous Integration mode. If true, Jest will run tests once and exit.
|
|
46
|
+
*/
|
|
47
|
+
ci?: boolean;
|
|
48
|
+
/**
|
|
49
|
+
* Enables colored output.
|
|
50
|
+
*/
|
|
51
|
+
color?: boolean;
|
|
52
|
+
/**
|
|
53
|
+
* Deletes the Jest cache directory and then exits without running tests. Will delete Jest's default cache directory.
|
|
54
|
+
*/
|
|
55
|
+
clearCache?: boolean;
|
|
56
|
+
/**
|
|
57
|
+
* Find and run the tests that cover a list of source files.
|
|
58
|
+
*
|
|
59
|
+
* @see https://jestjs.io/docs/cli#--findrelatedtests
|
|
60
|
+
*/
|
|
61
|
+
findRelatedTests?: string[];
|
|
62
|
+
/**
|
|
63
|
+
* 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.
|
|
64
|
+
*/
|
|
65
|
+
forceExit?: boolean;
|
|
66
|
+
/**
|
|
67
|
+
* Enables JSON output.
|
|
68
|
+
*/
|
|
69
|
+
json?: boolean;
|
|
70
|
+
/**
|
|
71
|
+
* 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)
|
|
72
|
+
*
|
|
73
|
+
* @see https://jestjs.io/docs/cli#--maxworkersnumberstring
|
|
74
|
+
*/
|
|
75
|
+
maxWorkers?: number | string;
|
|
76
|
+
/**
|
|
77
|
+
* 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.
|
|
78
|
+
*
|
|
79
|
+
* @see https://jestjs.io/docs/cli#--onlychanged
|
|
80
|
+
*/
|
|
81
|
+
onlyChanged?: boolean;
|
|
82
|
+
/**
|
|
83
|
+
* 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.
|
|
84
|
+
*
|
|
85
|
+
* @see https://jestjs.io/docs/cli#--changedsince
|
|
86
|
+
*/
|
|
87
|
+
changedSince?: string;
|
|
88
|
+
/**
|
|
89
|
+
* The path to a JSON file that Jest should write test results to.
|
|
90
|
+
*/
|
|
91
|
+
outputFile?: string;
|
|
92
|
+
/**
|
|
93
|
+
* Exit with code 0 even if no tests are found.
|
|
94
|
+
*
|
|
95
|
+
* @see https://jestjs.io/docs/cli#--passwithnotests
|
|
96
|
+
*
|
|
97
|
+
* @defaultValue true
|
|
98
|
+
*/
|
|
99
|
+
passWithNoTests?: boolean;
|
|
100
|
+
/**
|
|
101
|
+
* Randomize the order of test execution
|
|
102
|
+
*/
|
|
103
|
+
randomize?: boolean;
|
|
104
|
+
/**
|
|
105
|
+
* 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.
|
|
106
|
+
*
|
|
107
|
+
* @see https://jestjs.io/docs/cli#--runinband
|
|
108
|
+
*/
|
|
109
|
+
runInBand?: boolean;
|
|
110
|
+
/**
|
|
111
|
+
* Print your Jest config and then exits.
|
|
112
|
+
*
|
|
113
|
+
* @see https://jestjs.io/docs/cli#--showconfig
|
|
114
|
+
*/
|
|
115
|
+
showConfig?: boolean;
|
|
116
|
+
/**
|
|
117
|
+
* Prevent tests from printing messages through the console.
|
|
118
|
+
*
|
|
119
|
+
* @see https://jestjs.io/docs/cli#--silent
|
|
120
|
+
*/
|
|
121
|
+
silent?: boolean;
|
|
122
|
+
/**
|
|
123
|
+
* Run only tests with a name that matches the regex pattern.
|
|
124
|
+
*
|
|
125
|
+
* @see https://jestjs.io/docs/cli#--testnamepatternregex
|
|
126
|
+
*/
|
|
127
|
+
testNamePattern?: string;
|
|
128
|
+
/**
|
|
129
|
+
* 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.
|
|
130
|
+
*
|
|
131
|
+
* @see https://jestjs.io/docs/cli#--testpathignorepatternsregex
|
|
132
|
+
*/
|
|
133
|
+
testPathIgnorePatterns?: string[];
|
|
134
|
+
/**
|
|
135
|
+
* 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.
|
|
136
|
+
*
|
|
137
|
+
* @see https://jestjs.io/docs/cli#--testpathpatternsregex
|
|
138
|
+
*/
|
|
139
|
+
testPathPatterns?: string[];
|
|
140
|
+
/**
|
|
141
|
+
* Enables colored output.
|
|
142
|
+
*/
|
|
143
|
+
colors?: boolean;
|
|
144
|
+
/**
|
|
145
|
+
* A list of reporters to use for test results
|
|
146
|
+
*/
|
|
147
|
+
reporters?: string[];
|
|
148
|
+
/**
|
|
149
|
+
* Display individual test results with the test suite hierarchy.
|
|
150
|
+
*
|
|
151
|
+
* @see https://jestjs.io/docs/cli#--verbose
|
|
152
|
+
*/
|
|
153
|
+
verbose?: boolean;
|
|
154
|
+
/**
|
|
155
|
+
* A list of coverage reporters to use
|
|
156
|
+
*/
|
|
157
|
+
coverageReporters?: string[];
|
|
158
|
+
/**
|
|
159
|
+
* The directory where Jest should output its coverage files.
|
|
160
|
+
*/
|
|
161
|
+
coverageDirectory?: string;
|
|
162
|
+
/**
|
|
163
|
+
* A Node module that implements a custom results processor.
|
|
164
|
+
*/
|
|
165
|
+
testResultsProcessor?: string;
|
|
166
|
+
/**
|
|
167
|
+
* Update snapshots during this test run.
|
|
168
|
+
*/
|
|
169
|
+
updateSnapshot?: boolean;
|
|
170
|
+
/**
|
|
171
|
+
* Divert all output to stderr.
|
|
172
|
+
*/
|
|
173
|
+
useStderr?: boolean;
|
|
174
|
+
/**
|
|
175
|
+
* Watch files for changes and rerun tests related to changed files.
|
|
176
|
+
*/
|
|
177
|
+
watch?: boolean;
|
|
178
|
+
/**
|
|
179
|
+
* Watch files for changes and rerun all tests when something changes.
|
|
180
|
+
*/
|
|
181
|
+
watchAll?: boolean;
|
|
182
|
+
/**
|
|
183
|
+
* Adds a location field to test results. Used to report location of a test in a reporter. Example: `{ "column": 4, "line": 5 }`.
|
|
184
|
+
*
|
|
185
|
+
* @see https://jestjs.io/docs/cli#--testlocationinresultsboolean
|
|
186
|
+
*/
|
|
187
|
+
testLocationInResults?: boolean;
|
|
188
|
+
/**
|
|
189
|
+
* Default timeout of a test in milliseconds.
|
|
190
|
+
*
|
|
191
|
+
* @see https://jestjs.io/docs/cli#--testtimeoutmilliseconds
|
|
192
|
+
*
|
|
193
|
+
* @defaultValue 5000
|
|
194
|
+
*/
|
|
195
|
+
testTimeout?: number;
|
|
196
|
+
}
|
|
197
|
+
interface JestPluginUserConfig extends UserConfig {
|
|
198
|
+
test: {
|
|
199
|
+
/**
|
|
200
|
+
* Jest transformation options
|
|
201
|
+
*/
|
|
202
|
+
jest: Config.Argv;
|
|
203
|
+
};
|
|
204
|
+
}
|
|
205
|
+
interface JestPluginResolvedConfig extends ResolvedConfig {
|
|
206
|
+
test: {
|
|
207
|
+
/**
|
|
208
|
+
* Resolved Jest transformation options
|
|
209
|
+
*/
|
|
210
|
+
jest: Config.Argv;
|
|
211
|
+
};
|
|
212
|
+
}
|
|
213
|
+
type JestPluginContext<TResolvedConfig extends JestPluginResolvedConfig = JestPluginResolvedConfig> = PluginContext<TResolvedConfig>;
|
|
214
|
+
declare type __ΩJestPluginOptions = any[];
|
|
215
|
+
declare type __ΩJestPluginUserConfig = any[];
|
|
216
|
+
declare type __ΩJestPluginResolvedConfig = any[];
|
|
217
|
+
declare type __ΩJestPluginContext = any[];
|
|
218
|
+
//#endregion
|
|
219
|
+
export { JestPluginContext, JestPluginOptions, JestPluginResolvedConfig, JestPluginUserConfig, __ΩJestPluginContext, __ΩJestPluginOptions, __ΩJestPluginResolvedConfig, __ΩJestPluginUserConfig };
|
|
220
|
+
//# sourceMappingURL=plugin.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin.d.mts","names":[],"sources":["../../src/types/plugin.ts"],"sourcesContent":[],"mappings":";;;;;;UAuBiB,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"}
|
package/dist/types/plugin.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@powerlines/plugin-jest",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.263",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A package containing the Jest testing plugin for Powerlines.",
|
|
6
6
|
"repository": {
|
|
@@ -99,14 +99,14 @@
|
|
|
99
99
|
"jest-config": "^30.2.0",
|
|
100
100
|
"jest-resolve": "^30.2.0",
|
|
101
101
|
"jest-util": "^30.2.0",
|
|
102
|
-
"powerlines": "^0.38.
|
|
102
|
+
"powerlines": "^0.38.22"
|
|
103
103
|
},
|
|
104
104
|
"devDependencies": {
|
|
105
105
|
"@jest/types": "^30.2.0",
|
|
106
|
-
"@powerlines/plugin-plugin": "^0.12.
|
|
106
|
+
"@powerlines/plugin-plugin": "^0.12.206",
|
|
107
107
|
"@types/jest": "^30.0.0"
|
|
108
108
|
},
|
|
109
109
|
"publishConfig": { "access": "public" },
|
|
110
110
|
"types": "./dist/index.d.cts",
|
|
111
|
-
"gitHead": "
|
|
111
|
+
"gitHead": "02ca3097aeae5f5bb4838b4263e8cf7cc44fa3bd"
|
|
112
112
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { };
|
package/dist/plugin-C3MaN5jp.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { };
|
|
@@ -1,220 +0,0 @@
|
|
|
1
|
-
import { Config } from "@jest/types";
|
|
2
|
-
import { UserConfig } from "powerlines/types/config";
|
|
3
|
-
import { PluginContext } from "powerlines/types/context";
|
|
4
|
-
import { ResolvedConfig } from "powerlines/types/resolved";
|
|
5
|
-
|
|
6
|
-
//#region src/types/plugin.d.ts
|
|
7
|
-
interface JestPluginOptions {
|
|
8
|
-
/**
|
|
9
|
-
* Indicates that test coverage information should be collected and reported in the output.
|
|
10
|
-
*
|
|
11
|
-
* @see https://jestjs.io/docs/cli#--coverage
|
|
12
|
-
*/
|
|
13
|
-
codeCoverage?: boolean;
|
|
14
|
-
/**
|
|
15
|
-
* 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.
|
|
16
|
-
*
|
|
17
|
-
* @see https://jestjs.io/docs/cli#--configpath
|
|
18
|
-
*/
|
|
19
|
-
configFile?: string;
|
|
20
|
-
/**
|
|
21
|
-
* Attempt to collect and print open handles preventing Jest from exiting cleanly after all tests have completed.
|
|
22
|
-
*
|
|
23
|
-
* @see https://jestjs.io/docs/cli#--detectopenhandles
|
|
24
|
-
*/
|
|
25
|
-
detectOpenHandles?: boolean;
|
|
26
|
-
/**
|
|
27
|
-
* Logs the heap usage after every test. Useful to debug memory leaks. Use together with --runInBand and --expose-gc in node.
|
|
28
|
-
*/
|
|
29
|
-
logHeapUsage?: boolean;
|
|
30
|
-
/**
|
|
31
|
-
* **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
|
|
32
|
-
*/
|
|
33
|
-
detectLeaks?: boolean;
|
|
34
|
-
/**
|
|
35
|
-
* The name of the file to test.
|
|
36
|
-
*/
|
|
37
|
-
testFile?: string;
|
|
38
|
-
/**
|
|
39
|
-
* Exit the test suite immediately after `n` number of failing tests.
|
|
40
|
-
*
|
|
41
|
-
* @see https://jestjs.io/docs/cli#--bail
|
|
42
|
-
*/
|
|
43
|
-
bail?: boolean | number;
|
|
44
|
-
/**
|
|
45
|
-
* Continuous Integration mode. If true, Jest will run tests once and exit.
|
|
46
|
-
*/
|
|
47
|
-
ci?: boolean;
|
|
48
|
-
/**
|
|
49
|
-
* Enables colored output.
|
|
50
|
-
*/
|
|
51
|
-
color?: boolean;
|
|
52
|
-
/**
|
|
53
|
-
* Deletes the Jest cache directory and then exits without running tests. Will delete Jest's default cache directory.
|
|
54
|
-
*/
|
|
55
|
-
clearCache?: boolean;
|
|
56
|
-
/**
|
|
57
|
-
* Find and run the tests that cover a list of source files.
|
|
58
|
-
*
|
|
59
|
-
* @see https://jestjs.io/docs/cli#--findrelatedtests
|
|
60
|
-
*/
|
|
61
|
-
findRelatedTests?: string[];
|
|
62
|
-
/**
|
|
63
|
-
* 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.
|
|
64
|
-
*/
|
|
65
|
-
forceExit?: boolean;
|
|
66
|
-
/**
|
|
67
|
-
* Enables JSON output.
|
|
68
|
-
*/
|
|
69
|
-
json?: boolean;
|
|
70
|
-
/**
|
|
71
|
-
* 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)
|
|
72
|
-
*
|
|
73
|
-
* @see https://jestjs.io/docs/cli#--maxworkersnumberstring
|
|
74
|
-
*/
|
|
75
|
-
maxWorkers?: number | string;
|
|
76
|
-
/**
|
|
77
|
-
* 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.
|
|
78
|
-
*
|
|
79
|
-
* @see https://jestjs.io/docs/cli#--onlychanged
|
|
80
|
-
*/
|
|
81
|
-
onlyChanged?: boolean;
|
|
82
|
-
/**
|
|
83
|
-
* 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.
|
|
84
|
-
*
|
|
85
|
-
* @see https://jestjs.io/docs/cli#--changedsince
|
|
86
|
-
*/
|
|
87
|
-
changedSince?: string;
|
|
88
|
-
/**
|
|
89
|
-
* The path to a JSON file that Jest should write test results to.
|
|
90
|
-
*/
|
|
91
|
-
outputFile?: string;
|
|
92
|
-
/**
|
|
93
|
-
* Exit with code 0 even if no tests are found.
|
|
94
|
-
*
|
|
95
|
-
* @see https://jestjs.io/docs/cli#--passwithnotests
|
|
96
|
-
*
|
|
97
|
-
* @defaultValue true
|
|
98
|
-
*/
|
|
99
|
-
passWithNoTests?: boolean;
|
|
100
|
-
/**
|
|
101
|
-
* Randomize the order of test execution
|
|
102
|
-
*/
|
|
103
|
-
randomize?: boolean;
|
|
104
|
-
/**
|
|
105
|
-
* 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.
|
|
106
|
-
*
|
|
107
|
-
* @see https://jestjs.io/docs/cli#--runinband
|
|
108
|
-
*/
|
|
109
|
-
runInBand?: boolean;
|
|
110
|
-
/**
|
|
111
|
-
* Print your Jest config and then exits.
|
|
112
|
-
*
|
|
113
|
-
* @see https://jestjs.io/docs/cli#--showconfig
|
|
114
|
-
*/
|
|
115
|
-
showConfig?: boolean;
|
|
116
|
-
/**
|
|
117
|
-
* Prevent tests from printing messages through the console.
|
|
118
|
-
*
|
|
119
|
-
* @see https://jestjs.io/docs/cli#--silent
|
|
120
|
-
*/
|
|
121
|
-
silent?: boolean;
|
|
122
|
-
/**
|
|
123
|
-
* Run only tests with a name that matches the regex pattern.
|
|
124
|
-
*
|
|
125
|
-
* @see https://jestjs.io/docs/cli#--testnamepatternregex
|
|
126
|
-
*/
|
|
127
|
-
testNamePattern?: string;
|
|
128
|
-
/**
|
|
129
|
-
* 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.
|
|
130
|
-
*
|
|
131
|
-
* @see https://jestjs.io/docs/cli#--testpathignorepatternsregex
|
|
132
|
-
*/
|
|
133
|
-
testPathIgnorePatterns?: string[];
|
|
134
|
-
/**
|
|
135
|
-
* 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.
|
|
136
|
-
*
|
|
137
|
-
* @see https://jestjs.io/docs/cli#--testpathpatternsregex
|
|
138
|
-
*/
|
|
139
|
-
testPathPatterns?: string[];
|
|
140
|
-
/**
|
|
141
|
-
* Enables colored output.
|
|
142
|
-
*/
|
|
143
|
-
colors?: boolean;
|
|
144
|
-
/**
|
|
145
|
-
* A list of reporters to use for test results
|
|
146
|
-
*/
|
|
147
|
-
reporters?: string[];
|
|
148
|
-
/**
|
|
149
|
-
* Display individual test results with the test suite hierarchy.
|
|
150
|
-
*
|
|
151
|
-
* @see https://jestjs.io/docs/cli#--verbose
|
|
152
|
-
*/
|
|
153
|
-
verbose?: boolean;
|
|
154
|
-
/**
|
|
155
|
-
* A list of coverage reporters to use
|
|
156
|
-
*/
|
|
157
|
-
coverageReporters?: string[];
|
|
158
|
-
/**
|
|
159
|
-
* The directory where Jest should output its coverage files.
|
|
160
|
-
*/
|
|
161
|
-
coverageDirectory?: string;
|
|
162
|
-
/**
|
|
163
|
-
* A Node module that implements a custom results processor.
|
|
164
|
-
*/
|
|
165
|
-
testResultsProcessor?: string;
|
|
166
|
-
/**
|
|
167
|
-
* Update snapshots during this test run.
|
|
168
|
-
*/
|
|
169
|
-
updateSnapshot?: boolean;
|
|
170
|
-
/**
|
|
171
|
-
* Divert all output to stderr.
|
|
172
|
-
*/
|
|
173
|
-
useStderr?: boolean;
|
|
174
|
-
/**
|
|
175
|
-
* Watch files for changes and rerun tests related to changed files.
|
|
176
|
-
*/
|
|
177
|
-
watch?: boolean;
|
|
178
|
-
/**
|
|
179
|
-
* Watch files for changes and rerun all tests when something changes.
|
|
180
|
-
*/
|
|
181
|
-
watchAll?: boolean;
|
|
182
|
-
/**
|
|
183
|
-
* Adds a location field to test results. Used to report location of a test in a reporter. Example: `{ "column": 4, "line": 5 }`.
|
|
184
|
-
*
|
|
185
|
-
* @see https://jestjs.io/docs/cli#--testlocationinresultsboolean
|
|
186
|
-
*/
|
|
187
|
-
testLocationInResults?: boolean;
|
|
188
|
-
/**
|
|
189
|
-
* Default timeout of a test in milliseconds.
|
|
190
|
-
*
|
|
191
|
-
* @see https://jestjs.io/docs/cli#--testtimeoutmilliseconds
|
|
192
|
-
*
|
|
193
|
-
* @defaultValue 5000
|
|
194
|
-
*/
|
|
195
|
-
testTimeout?: number;
|
|
196
|
-
}
|
|
197
|
-
interface JestPluginUserConfig extends UserConfig {
|
|
198
|
-
test: {
|
|
199
|
-
/**
|
|
200
|
-
* Jest transformation options
|
|
201
|
-
*/
|
|
202
|
-
jest: Config.Argv;
|
|
203
|
-
};
|
|
204
|
-
}
|
|
205
|
-
interface JestPluginResolvedConfig extends ResolvedConfig {
|
|
206
|
-
test: {
|
|
207
|
-
/**
|
|
208
|
-
* Resolved Jest transformation options
|
|
209
|
-
*/
|
|
210
|
-
jest: Config.Argv;
|
|
211
|
-
};
|
|
212
|
-
}
|
|
213
|
-
type JestPluginContext<TResolvedConfig extends JestPluginResolvedConfig = JestPluginResolvedConfig> = PluginContext<TResolvedConfig>;
|
|
214
|
-
declare type __ΩJestPluginOptions = any[];
|
|
215
|
-
declare type __ΩJestPluginUserConfig = any[];
|
|
216
|
-
declare type __ΩJestPluginResolvedConfig = any[];
|
|
217
|
-
declare type __ΩJestPluginContext = any[];
|
|
218
|
-
//#endregion
|
|
219
|
-
export { __ΩJestPluginContext as a, __ΩJestPluginUserConfig as c, JestPluginUserConfig as i, JestPluginOptions as n, __ΩJestPluginOptions as o, JestPluginResolvedConfig as r, __ΩJestPluginResolvedConfig as s, JestPluginContext as t };
|
|
220
|
-
//# sourceMappingURL=plugin-C9y4arek.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-C9y4arek.d.mts","names":[],"sources":["../src/types/plugin.ts"],"sourcesContent":[],"mappings":";;;;;;UAuBiB,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"}
|
package/dist/plugin-DHXHjv16.cjs
DELETED
|
File without changes
|
|
@@ -1,220 +0,0 @@
|
|
|
1
|
-
import { Config } from "@jest/types";
|
|
2
|
-
import { UserConfig } from "powerlines/types/config";
|
|
3
|
-
import { PluginContext } from "powerlines/types/context";
|
|
4
|
-
import { ResolvedConfig } from "powerlines/types/resolved";
|
|
5
|
-
|
|
6
|
-
//#region src/types/plugin.d.ts
|
|
7
|
-
interface JestPluginOptions {
|
|
8
|
-
/**
|
|
9
|
-
* Indicates that test coverage information should be collected and reported in the output.
|
|
10
|
-
*
|
|
11
|
-
* @see https://jestjs.io/docs/cli#--coverage
|
|
12
|
-
*/
|
|
13
|
-
codeCoverage?: boolean;
|
|
14
|
-
/**
|
|
15
|
-
* 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.
|
|
16
|
-
*
|
|
17
|
-
* @see https://jestjs.io/docs/cli#--configpath
|
|
18
|
-
*/
|
|
19
|
-
configFile?: string;
|
|
20
|
-
/**
|
|
21
|
-
* Attempt to collect and print open handles preventing Jest from exiting cleanly after all tests have completed.
|
|
22
|
-
*
|
|
23
|
-
* @see https://jestjs.io/docs/cli#--detectopenhandles
|
|
24
|
-
*/
|
|
25
|
-
detectOpenHandles?: boolean;
|
|
26
|
-
/**
|
|
27
|
-
* Logs the heap usage after every test. Useful to debug memory leaks. Use together with --runInBand and --expose-gc in node.
|
|
28
|
-
*/
|
|
29
|
-
logHeapUsage?: boolean;
|
|
30
|
-
/**
|
|
31
|
-
* **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
|
|
32
|
-
*/
|
|
33
|
-
detectLeaks?: boolean;
|
|
34
|
-
/**
|
|
35
|
-
* The name of the file to test.
|
|
36
|
-
*/
|
|
37
|
-
testFile?: string;
|
|
38
|
-
/**
|
|
39
|
-
* Exit the test suite immediately after `n` number of failing tests.
|
|
40
|
-
*
|
|
41
|
-
* @see https://jestjs.io/docs/cli#--bail
|
|
42
|
-
*/
|
|
43
|
-
bail?: boolean | number;
|
|
44
|
-
/**
|
|
45
|
-
* Continuous Integration mode. If true, Jest will run tests once and exit.
|
|
46
|
-
*/
|
|
47
|
-
ci?: boolean;
|
|
48
|
-
/**
|
|
49
|
-
* Enables colored output.
|
|
50
|
-
*/
|
|
51
|
-
color?: boolean;
|
|
52
|
-
/**
|
|
53
|
-
* Deletes the Jest cache directory and then exits without running tests. Will delete Jest's default cache directory.
|
|
54
|
-
*/
|
|
55
|
-
clearCache?: boolean;
|
|
56
|
-
/**
|
|
57
|
-
* Find and run the tests that cover a list of source files.
|
|
58
|
-
*
|
|
59
|
-
* @see https://jestjs.io/docs/cli#--findrelatedtests
|
|
60
|
-
*/
|
|
61
|
-
findRelatedTests?: string[];
|
|
62
|
-
/**
|
|
63
|
-
* 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.
|
|
64
|
-
*/
|
|
65
|
-
forceExit?: boolean;
|
|
66
|
-
/**
|
|
67
|
-
* Enables JSON output.
|
|
68
|
-
*/
|
|
69
|
-
json?: boolean;
|
|
70
|
-
/**
|
|
71
|
-
* 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)
|
|
72
|
-
*
|
|
73
|
-
* @see https://jestjs.io/docs/cli#--maxworkersnumberstring
|
|
74
|
-
*/
|
|
75
|
-
maxWorkers?: number | string;
|
|
76
|
-
/**
|
|
77
|
-
* 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.
|
|
78
|
-
*
|
|
79
|
-
* @see https://jestjs.io/docs/cli#--onlychanged
|
|
80
|
-
*/
|
|
81
|
-
onlyChanged?: boolean;
|
|
82
|
-
/**
|
|
83
|
-
* 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.
|
|
84
|
-
*
|
|
85
|
-
* @see https://jestjs.io/docs/cli#--changedsince
|
|
86
|
-
*/
|
|
87
|
-
changedSince?: string;
|
|
88
|
-
/**
|
|
89
|
-
* The path to a JSON file that Jest should write test results to.
|
|
90
|
-
*/
|
|
91
|
-
outputFile?: string;
|
|
92
|
-
/**
|
|
93
|
-
* Exit with code 0 even if no tests are found.
|
|
94
|
-
*
|
|
95
|
-
* @see https://jestjs.io/docs/cli#--passwithnotests
|
|
96
|
-
*
|
|
97
|
-
* @defaultValue true
|
|
98
|
-
*/
|
|
99
|
-
passWithNoTests?: boolean;
|
|
100
|
-
/**
|
|
101
|
-
* Randomize the order of test execution
|
|
102
|
-
*/
|
|
103
|
-
randomize?: boolean;
|
|
104
|
-
/**
|
|
105
|
-
* 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.
|
|
106
|
-
*
|
|
107
|
-
* @see https://jestjs.io/docs/cli#--runinband
|
|
108
|
-
*/
|
|
109
|
-
runInBand?: boolean;
|
|
110
|
-
/**
|
|
111
|
-
* Print your Jest config and then exits.
|
|
112
|
-
*
|
|
113
|
-
* @see https://jestjs.io/docs/cli#--showconfig
|
|
114
|
-
*/
|
|
115
|
-
showConfig?: boolean;
|
|
116
|
-
/**
|
|
117
|
-
* Prevent tests from printing messages through the console.
|
|
118
|
-
*
|
|
119
|
-
* @see https://jestjs.io/docs/cli#--silent
|
|
120
|
-
*/
|
|
121
|
-
silent?: boolean;
|
|
122
|
-
/**
|
|
123
|
-
* Run only tests with a name that matches the regex pattern.
|
|
124
|
-
*
|
|
125
|
-
* @see https://jestjs.io/docs/cli#--testnamepatternregex
|
|
126
|
-
*/
|
|
127
|
-
testNamePattern?: string;
|
|
128
|
-
/**
|
|
129
|
-
* 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.
|
|
130
|
-
*
|
|
131
|
-
* @see https://jestjs.io/docs/cli#--testpathignorepatternsregex
|
|
132
|
-
*/
|
|
133
|
-
testPathIgnorePatterns?: string[];
|
|
134
|
-
/**
|
|
135
|
-
* 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.
|
|
136
|
-
*
|
|
137
|
-
* @see https://jestjs.io/docs/cli#--testpathpatternsregex
|
|
138
|
-
*/
|
|
139
|
-
testPathPatterns?: string[];
|
|
140
|
-
/**
|
|
141
|
-
* Enables colored output.
|
|
142
|
-
*/
|
|
143
|
-
colors?: boolean;
|
|
144
|
-
/**
|
|
145
|
-
* A list of reporters to use for test results
|
|
146
|
-
*/
|
|
147
|
-
reporters?: string[];
|
|
148
|
-
/**
|
|
149
|
-
* Display individual test results with the test suite hierarchy.
|
|
150
|
-
*
|
|
151
|
-
* @see https://jestjs.io/docs/cli#--verbose
|
|
152
|
-
*/
|
|
153
|
-
verbose?: boolean;
|
|
154
|
-
/**
|
|
155
|
-
* A list of coverage reporters to use
|
|
156
|
-
*/
|
|
157
|
-
coverageReporters?: string[];
|
|
158
|
-
/**
|
|
159
|
-
* The directory where Jest should output its coverage files.
|
|
160
|
-
*/
|
|
161
|
-
coverageDirectory?: string;
|
|
162
|
-
/**
|
|
163
|
-
* A Node module that implements a custom results processor.
|
|
164
|
-
*/
|
|
165
|
-
testResultsProcessor?: string;
|
|
166
|
-
/**
|
|
167
|
-
* Update snapshots during this test run.
|
|
168
|
-
*/
|
|
169
|
-
updateSnapshot?: boolean;
|
|
170
|
-
/**
|
|
171
|
-
* Divert all output to stderr.
|
|
172
|
-
*/
|
|
173
|
-
useStderr?: boolean;
|
|
174
|
-
/**
|
|
175
|
-
* Watch files for changes and rerun tests related to changed files.
|
|
176
|
-
*/
|
|
177
|
-
watch?: boolean;
|
|
178
|
-
/**
|
|
179
|
-
* Watch files for changes and rerun all tests when something changes.
|
|
180
|
-
*/
|
|
181
|
-
watchAll?: boolean;
|
|
182
|
-
/**
|
|
183
|
-
* Adds a location field to test results. Used to report location of a test in a reporter. Example: `{ "column": 4, "line": 5 }`.
|
|
184
|
-
*
|
|
185
|
-
* @see https://jestjs.io/docs/cli#--testlocationinresultsboolean
|
|
186
|
-
*/
|
|
187
|
-
testLocationInResults?: boolean;
|
|
188
|
-
/**
|
|
189
|
-
* Default timeout of a test in milliseconds.
|
|
190
|
-
*
|
|
191
|
-
* @see https://jestjs.io/docs/cli#--testtimeoutmilliseconds
|
|
192
|
-
*
|
|
193
|
-
* @defaultValue 5000
|
|
194
|
-
*/
|
|
195
|
-
testTimeout?: number;
|
|
196
|
-
}
|
|
197
|
-
interface JestPluginUserConfig extends UserConfig {
|
|
198
|
-
test: {
|
|
199
|
-
/**
|
|
200
|
-
* Jest transformation options
|
|
201
|
-
*/
|
|
202
|
-
jest: Config.Argv;
|
|
203
|
-
};
|
|
204
|
-
}
|
|
205
|
-
interface JestPluginResolvedConfig extends ResolvedConfig {
|
|
206
|
-
test: {
|
|
207
|
-
/**
|
|
208
|
-
* Resolved Jest transformation options
|
|
209
|
-
*/
|
|
210
|
-
jest: Config.Argv;
|
|
211
|
-
};
|
|
212
|
-
}
|
|
213
|
-
type JestPluginContext<TResolvedConfig extends JestPluginResolvedConfig = JestPluginResolvedConfig> = PluginContext<TResolvedConfig>;
|
|
214
|
-
declare type __ΩJestPluginOptions = any[];
|
|
215
|
-
declare type __ΩJestPluginUserConfig = any[];
|
|
216
|
-
declare type __ΩJestPluginResolvedConfig = any[];
|
|
217
|
-
declare type __ΩJestPluginContext = any[];
|
|
218
|
-
//#endregion
|
|
219
|
-
export { __ΩJestPluginContext as a, __ΩJestPluginUserConfig as c, JestPluginUserConfig as i, JestPluginOptions as n, __ΩJestPluginOptions as o, JestPluginResolvedConfig as r, __ΩJestPluginResolvedConfig as s, JestPluginContext as t };
|
|
220
|
-
//# sourceMappingURL=plugin-p47uTOgH.d.cts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-p47uTOgH.d.cts","names":[],"sources":["../src/types/plugin.ts"],"sourcesContent":[],"mappings":";;;;;;UAuBiB,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"}
|
package/dist/types-CTUnla4x.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { };
|
package/dist/types-DHkg7xmX.cjs
DELETED
|
File without changes
|