@powerlines/plugin-jest 0.1.54 → 0.1.56
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/README.md +8 -2
- package/dist/index-BgAdqTbb.d.mts +1 -0
- package/dist/index-CEgs-Dz2.d.cts +1 -0
- package/dist/index.cjs +7 -13
- package/dist/index.d.cts +7 -26
- package/dist/index.d.cts.map +1 -0
- package/dist/index.d.mts +15 -0
- package/dist/index.d.mts.map +1 -0
- package/dist/index.mjs +8 -0
- package/dist/index.mjs.map +1 -0
- package/dist/plugin-BUNNKjch.d.mts +1854 -0
- package/dist/plugin-BUNNKjch.d.mts.map +1 -0
- package/dist/plugin-BkZvlgu_.d.cts +1854 -0
- package/dist/plugin-BkZvlgu_.d.cts.map +1 -0
- package/dist/plugin-Bvn-he2n.mjs +1 -0
- package/dist/types/index.cjs +1 -1
- package/dist/types/index.d.cts +3 -23
- package/dist/types/index.d.mts +3 -0
- package/dist/types/index.mjs +1 -0
- package/dist/types/plugin.cjs +1 -1
- package/dist/types/plugin.d.cts +2 -23
- package/dist/types/plugin.d.mts +2 -0
- package/dist/types/plugin.mjs +1 -0
- package/dist/types-B7VYa_Pp.mjs +1 -0
- package/dist/types-DHkg7xmX.cjs +0 -0
- package/package.json +40 -22
- package/dist/index-BqI0CtBE.d.cts +0 -1765
- package/dist/index-BqI0CtBE.d.ts +0 -1765
- package/dist/index.d.ts +0 -34
- package/dist/index.js +0 -13
- package/dist/types/index.d.ts +0 -23
- package/dist/types/index.js +0 -1
- package/dist/types/plugin.d.ts +0 -23
- /package/dist/{types/plugin.js → plugin-DHXHjv16.cjs} +0 -0
package/README.md
CHANGED
|
@@ -3,7 +3,13 @@
|
|
|
3
3
|
<!-- markdownlint-disable -->
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
<div align="center"
|
|
6
|
+
<div align="center">
|
|
7
|
+
<picture>
|
|
8
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://public.storm-cdn.com/powerlines/banner-1280x640-dark-optimized.gif">
|
|
9
|
+
<source media="(prefers-color-scheme: light)" srcset="https://public.storm-cdn.com/powerlines/banner-1280x640-light-optimized.gif">
|
|
10
|
+
<img src="https://public.storm-cdn.com/powerlines/banner-1280x640-dark-optimized.gif" width="100%" alt="Powerlines" />
|
|
11
|
+
</picture>
|
|
12
|
+
</div>
|
|
7
13
|
<br />
|
|
8
14
|
|
|
9
15
|
<div align="center">
|
|
@@ -16,7 +22,7 @@
|
|
|
16
22
|
</div>
|
|
17
23
|
|
|
18
24
|
<br />
|
|
19
|
-
This package is part of the
|
|
25
|
+
This package is part of the 🔌 <b>Powerlines</b> monorepo. Powerlines packages include CLI utility applications, tools, and various libraries used to create modern, scalable web applications.
|
|
20
26
|
<br />
|
|
21
27
|
|
|
22
28
|
<h3 align="center">💻 Visit <a href="https://stormsoftware.com" target="_blank">stormsoftware.com</a> to stay up to date with this developer</h3><br />
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
package/dist/index.cjs
CHANGED
|
@@ -1,13 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
${t__default.default.bold("Test result summary:")}
|
|
9
|
-
${y}
|
|
10
|
-
${x}
|
|
11
|
-
${k}
|
|
12
|
-
${t__default.default.bold("Time:")} ${jestUtil.formatTime((Date.now()-s.startTime)/1e3)}
|
|
13
|
-
`);}}}),"plugin");var M=L;exports.default=M;exports.plugin=L;Object.keys(types).forEach(function(k){if(k!=='default'&&!Object.prototype.hasOwnProperty.call(exports,k))Object.defineProperty(exports,k,{enumerable:true,get:function(){return types[k]}})});
|
|
1
|
+
Object.defineProperty(exports,`__esModule`,{value:!0});var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},s=(n,r,a)=>(a=n==null?{}:e(i(n)),o(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));require(`./plugin-DHXHjv16.cjs`),require(`./types-DHkg7xmX.cjs`);let c=require(`@storm-software/config-tools/types`),l=require(`@stryke/path/join`),u=require(`chalk`);u=s(u);let d=require(`jest`),f=require(`jest-util`);const p=(e={})=>({name:`jest`,async config(){let t={$0:void 0,_:[],coverage:e.codeCoverage,bail:e.bail,cache:!0,cacheDirectory:(0,l.joinPaths)(this.cachePath,`jest`),ci:e.ci,color:e.colors??!0,debug:this.config.mode===`development`,detectOpenHandles:e.detectOpenHandles,forceExit:e.forceExit,logHeapUsage:e.logHeapUsage,detectLeaks:e.detectLeaks,json:e.json,maxWorkers:e.maxWorkers,onlyChanged:e.onlyChanged,changedSince:e.changedSince,outputFile:e.outputFile,passWithNoTests:e.passWithNoTests,runInBand:e.runInBand,showConfig:e.showConfig,silent:e.silent,testLocationInResults:e.testLocationInResults,testNamePattern:e.testNamePattern,testPathPatterns:e.testPathPatterns,testPathIgnorePatterns:e.testPathIgnorePatterns,testTimeout:e.testTimeout,colors:e.colors??!0,verbose:e.verbose,testResultsProcessor:e.testResultsProcessor,updateSnapshot:e.updateSnapshot,useStderr:e.useStderr,watch:e.watch,watchAll:e.watchAll,randomize:e.randomize};if(e.testFile&&t._.push(e.testFile),e.findRelatedTests){let n=e.findRelatedTests.map(e=>e.trim());t._.push(...n),t.findRelatedTests=!0}return e.coverageDirectory&&(t.coverageDirectory=(0,l.joinPaths)(this.workspaceConfig.workspaceRoot,e.coverageDirectory)),e.clearCache&&(t.clearCache=!0),e.reporters&&e.reporters.length>0&&(t.reporters=e.reporters),Array.isArray(e.coverageReporters)&&e.coverageReporters.length>0&&(t.coverageReporters=e.coverageReporters),{test:{jest:t}}},async test(){if(this.config.test.jest){let{results:e}=await(0,d.runCLI)(this.config.test.jest,[(0,l.joinPaths)(this.workspaceConfig.workspaceRoot,this.config.projectRoot)]),t=e.snapshot,n=t.added,r=t.unmatched,i=t.unchecked,a=t.filesRemoved,o=t.didUpdate,s=t.matched,p=t.total,m=t.updated,h=e.numFailedTestSuites,g=e.numPassedTestSuites,_=e.numPendingTestSuites,v=h+g,y=e.testResults.length,b=e.numFailedTests,x=e.numPassedTests,S=e.numPendingTests,C=e.numTodoTests,w=e.numTotalTests,T=`${u.default.bold(`Test Suites: `)+(h?`${u.default.bold(u.default.red(`${h} failed`))}, `:``)+(_?`${u.default.bold(u.default.yellow(`${_} skipped`))}, `:``)+(g?`${u.default.bold(u.default.green(`${g} passed`))}, `:``)+(v===y?y:`${v} of ${y}`)} total`,E=`${u.default.bold(`Tests: `)+(b>0?`${u.default.bold(u.default.red(`${b} failed`))}, `:``)+(S>0?`${u.default.bold(u.default.yellow(`${S} skipped`))}, `:``)+(C>0?`${u.default.bold(u.default.magenta(`${C} todo`))}, `:``)+(x>0?`${u.default.bold(u.default.green(`${x} passed`))}, `:``)}${w} total`,D=`${u.default.bold(`Snapshots: `)+(r?`${u.default.bold(u.default.red(`${r} failed`))}, `:``)+(i&&!o?`${u.default.bold(u.default.yellow(`${i} obsolete`))}, `:``)+(i&&o?`${u.default.bold(u.default.green(`${i} removed`))}, `:``)+(a&&!o?`${u.default.bold(u.default.yellow(`${(0,f.pluralize)(`file`,a)} obsolete`))}, `:``)+(a&&o?`${u.default.bold(u.default.green(`${(0,f.pluralize)(`file`,a)} removed`))}, `:``)+(m?`${u.default.bold(u.default.green(`${m} updated`))}, `:``)+(n?`${u.default.bold(u.default.green(`${n} written`))}, `:``)+(s?`${u.default.bold(u.default.green(`${s} passed`))}, `:``)}${p} total`;this.log(c.LogLevelLabel.INFO,`
|
|
2
|
+
${u.default.bold(`Test result summary:`)}
|
|
3
|
+
${T}
|
|
4
|
+
${E}
|
|
5
|
+
${D}
|
|
6
|
+
${u.default.bold(`Time:`)} ${(0,f.formatTime)((Date.now()-e.startTime)/1e3)}
|
|
7
|
+
`)}}});var m=p;exports.default=m,exports.plugin=p;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,27 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
import '@storm-software/config-tools/types';
|
|
6
|
-
import '@storm-software/config/types';
|
|
7
|
-
import '@stryke/types/base';
|
|
8
|
-
import '@stryke/types/configuration';
|
|
9
|
-
import '@stryke/types/file';
|
|
10
|
-
import 'vite';
|
|
11
|
-
import '@stryke/env/get-env-paths';
|
|
12
|
-
import '@stryke/http/fetch';
|
|
13
|
-
import '@stryke/types/package-json';
|
|
14
|
-
import 'jiti';
|
|
15
|
-
import 'magic-string';
|
|
16
|
-
import 'oxc-parser';
|
|
17
|
-
import 'semver';
|
|
18
|
-
import 'ts-morph';
|
|
19
|
-
import 'undici';
|
|
20
|
-
import 'unplugin';
|
|
21
|
-
import '@stryke/fs/resolve';
|
|
22
|
-
import '@stryke/types/tsconfig';
|
|
23
|
-
import 'typescript';
|
|
24
|
-
import '@stryke/types/array';
|
|
1
|
+
import { a as __ΩJestPluginContext, c as __ΩJestPluginUserConfig, i as JestPluginUserConfig, l as Plugin, n as JestPluginOptions, o as __ΩJestPluginOptions, r as JestPluginResolvedConfig, s as __ΩJestPluginResolvedConfig, t as JestPluginContext } from "./plugin-BkZvlgu_.cjs";
|
|
2
|
+
import "./index-CEgs-Dz2.cjs";
|
|
3
|
+
|
|
4
|
+
//#region src/index.d.ts
|
|
25
5
|
|
|
26
6
|
/**
|
|
27
7
|
* Jest plugin for Powerlines.
|
|
@@ -30,5 +10,6 @@ import '@stryke/types/array';
|
|
|
30
10
|
* @returns A Powerlines plugin that integrates Jest testing.
|
|
31
11
|
*/
|
|
32
12
|
declare const plugin: <TContext extends JestPluginContext = JestPluginContext>(options?: JestPluginOptions) => Plugin<TContext>;
|
|
33
|
-
|
|
34
|
-
export { JestPluginContext, JestPluginOptions, plugin as default, plugin };
|
|
13
|
+
//#endregion
|
|
14
|
+
export { JestPluginContext, JestPluginOptions, JestPluginResolvedConfig, JestPluginUserConfig, __ΩJestPluginContext, __ΩJestPluginOptions, __ΩJestPluginResolvedConfig, __ΩJestPluginUserConfig, plugin as default, plugin };
|
|
15
|
+
//# sourceMappingURL=index.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/index.ts"],"sourcesContent":[],"mappings":";;;;;;AAuCA;;;;;AAEG,cAFU,MAEV,EAAA,CAAA,iBAFqC,iBAErC,GAFyD,iBAEzD,CAAA,CAAA,OAAA,CAAA,EADQ,iBACR,EAAA,GAAA,MAAA,CAAO,QAAP,CAAA"}
|
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { a as __ΩJestPluginContext, c as __ΩJestPluginUserConfig, i as JestPluginUserConfig, l as Plugin, n as JestPluginOptions, o as __ΩJestPluginOptions, r as JestPluginResolvedConfig, s as __ΩJestPluginResolvedConfig, t as JestPluginContext } from "./plugin-BUNNKjch.mjs";
|
|
2
|
+
import "./index-BgAdqTbb.mjs";
|
|
3
|
+
|
|
4
|
+
//#region src/index.d.ts
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Jest plugin for Powerlines.
|
|
8
|
+
*
|
|
9
|
+
* @param options - The Jest plugin user configuration options.
|
|
10
|
+
* @returns A Powerlines plugin that integrates Jest testing.
|
|
11
|
+
*/
|
|
12
|
+
declare const plugin: <TContext extends JestPluginContext = JestPluginContext>(options?: JestPluginOptions) => Plugin<TContext>;
|
|
13
|
+
//#endregion
|
|
14
|
+
export { JestPluginContext, JestPluginOptions, JestPluginResolvedConfig, JestPluginUserConfig, __ΩJestPluginContext, __ΩJestPluginOptions, __ΩJestPluginResolvedConfig, __ΩJestPluginUserConfig, plugin as default, plugin };
|
|
15
|
+
//# sourceMappingURL=index.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.ts"],"sourcesContent":[],"mappings":";;;;;;AAuCA;;;;;AAEG,cAFU,MAEV,EAAA,CAAA,iBAFqC,iBAErC,GAFyD,iBAEzD,CAAA,CAAA,OAAA,CAAA,EADQ,iBACR,EAAA,GAAA,MAAA,CAAO,QAAP,CAAA"}
|
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import"./plugin-Bvn-he2n.mjs";import"./types-B7VYa_Pp.mjs";import{LogLevelLabel as e}from"@storm-software/config-tools/types";import{joinPaths as t}from"@stryke/path/join";import n from"chalk";import{runCLI as r}from"jest";import{formatTime as i,pluralize as a}from"jest-util";const o=(o={})=>({name:`jest`,async config(){let e={$0:void 0,_:[],coverage:o.codeCoverage,bail:o.bail,cache:!0,cacheDirectory:t(this.cachePath,`jest`),ci:o.ci,color:o.colors??!0,debug:this.config.mode===`development`,detectOpenHandles:o.detectOpenHandles,forceExit:o.forceExit,logHeapUsage:o.logHeapUsage,detectLeaks:o.detectLeaks,json:o.json,maxWorkers:o.maxWorkers,onlyChanged:o.onlyChanged,changedSince:o.changedSince,outputFile:o.outputFile,passWithNoTests:o.passWithNoTests,runInBand:o.runInBand,showConfig:o.showConfig,silent:o.silent,testLocationInResults:o.testLocationInResults,testNamePattern:o.testNamePattern,testPathPatterns:o.testPathPatterns,testPathIgnorePatterns:o.testPathIgnorePatterns,testTimeout:o.testTimeout,colors:o.colors??!0,verbose:o.verbose,testResultsProcessor:o.testResultsProcessor,updateSnapshot:o.updateSnapshot,useStderr:o.useStderr,watch:o.watch,watchAll:o.watchAll,randomize:o.randomize};if(o.testFile&&e._.push(o.testFile),o.findRelatedTests){let t=o.findRelatedTests.map(e=>e.trim());e._.push(...t),e.findRelatedTests=!0}return o.coverageDirectory&&(e.coverageDirectory=t(this.workspaceConfig.workspaceRoot,o.coverageDirectory)),o.clearCache&&(e.clearCache=!0),o.reporters&&o.reporters.length>0&&(e.reporters=o.reporters),Array.isArray(o.coverageReporters)&&o.coverageReporters.length>0&&(e.coverageReporters=o.coverageReporters),{test:{jest:e}}},async test(){if(this.config.test.jest){let{results:o}=await r(this.config.test.jest,[t(this.workspaceConfig.workspaceRoot,this.config.projectRoot)]),s=o.snapshot,c=s.added,l=s.unmatched,u=s.unchecked,d=s.filesRemoved,f=s.didUpdate,p=s.matched,m=s.total,h=s.updated,g=o.numFailedTestSuites,_=o.numPassedTestSuites,v=o.numPendingTestSuites,y=g+_,b=o.testResults.length,x=o.numFailedTests,S=o.numPassedTests,C=o.numPendingTests,w=o.numTodoTests,T=o.numTotalTests,E=`${n.bold(`Test Suites: `)+(g?`${n.bold(n.red(`${g} failed`))}, `:``)+(v?`${n.bold(n.yellow(`${v} skipped`))}, `:``)+(_?`${n.bold(n.green(`${_} passed`))}, `:``)+(y===b?b:`${y} of ${b}`)} total`,D=`${n.bold(`Tests: `)+(x>0?`${n.bold(n.red(`${x} failed`))}, `:``)+(C>0?`${n.bold(n.yellow(`${C} skipped`))}, `:``)+(w>0?`${n.bold(n.magenta(`${w} todo`))}, `:``)+(S>0?`${n.bold(n.green(`${S} passed`))}, `:``)}${T} total`,O=`${n.bold(`Snapshots: `)+(l?`${n.bold(n.red(`${l} failed`))}, `:``)+(u&&!f?`${n.bold(n.yellow(`${u} obsolete`))}, `:``)+(u&&f?`${n.bold(n.green(`${u} removed`))}, `:``)+(d&&!f?`${n.bold(n.yellow(`${a(`file`,d)} obsolete`))}, `:``)+(d&&f?`${n.bold(n.green(`${a(`file`,d)} removed`))}, `:``)+(h?`${n.bold(n.green(`${h} updated`))}, `:``)+(c?`${n.bold(n.green(`${c} written`))}, `:``)+(p?`${n.bold(n.green(`${p} passed`))}, `:``)}${m} total`;this.log(e.INFO,`
|
|
2
|
+
${n.bold(`Test result summary:`)}
|
|
3
|
+
${E}
|
|
4
|
+
${D}
|
|
5
|
+
${O}
|
|
6
|
+
${n.bold(`Time:`)} ${i((Date.now()-o.startTime)/1e3)}
|
|
7
|
+
`)}}});var s=o;export{s as default,o as plugin};
|
|
8
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +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 { LogLevelLabel } from \"@storm-software/config-tools/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.log(\n LogLevelLabel.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":"qRAuCA,MAAa,GACX,EAA6B,EAAE,IAExB,CACL,KAAM,OACN,MAAM,QAAS,CACb,IAAMA,EAAsB,CAC1B,GAAI,IAAA,GACJ,EAAG,EAAE,CACL,SAAU,EAAQ,aAClB,KAAM,EAAQ,KACd,MAAO,GACP,eAAgB,EAAU,KAAK,UAAW,OAAO,CACjD,GAAI,EAAQ,GACZ,MAAO,EAAQ,QAAU,GACzB,MAAO,KAAK,OAAO,OAAS,cAC5B,kBAAmB,EAAQ,kBAC3B,UAAW,EAAQ,UACnB,aAAc,EAAQ,aACtB,YAAa,EAAQ,YACrB,KAAM,EAAQ,KACd,WAAY,EAAQ,WACpB,YAAa,EAAQ,YACrB,aAAc,EAAQ,aACtB,WAAY,EAAQ,WACpB,gBAAiB,EAAQ,gBACzB,UAAW,EAAQ,UACnB,WAAY,EAAQ,WACpB,OAAQ,EAAQ,OAChB,sBAAuB,EAAQ,sBAC/B,gBAAiB,EAAQ,gBACzB,iBAAkB,EAAQ,iBAC1B,uBAAwB,EAAQ,uBAChC,YAAa,EAAQ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