@powerlines/plugin-jest 0.1.6 → 0.1.8
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-BwByTg_8.d.cts +1513 -0
- package/dist/index-BwByTg_8.d.ts +1513 -0
- package/dist/src/index.cjs +13 -0
- package/dist/src/index.d.cts +33 -0
- package/dist/src/index.d.ts +33 -0
- package/dist/src/index.js +13 -0
- package/dist/types/index.cjs +1 -0
- package/dist/types/index.d.cts +22 -0
- package/dist/types/index.d.ts +22 -0
- package/dist/types/index.js +1 -0
- package/dist/types/plugin.cjs +1 -0
- package/dist/types/plugin.d.cts +22 -0
- package/dist/types/plugin.d.ts +22 -0
- package/dist/types/plugin.js +0 -0
- package/package.json +6 -6
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
'use strict';Object.defineProperty(exports,'__esModule',{value:true});var types$1=require('@storm-software/config-tools/types'),join=require('@stryke/path/join'),t=require('chalk'),jest=require('jest'),jestUtil=require('jest-util'),types=require('./types');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var t__default=/*#__PURE__*/_interopDefault(t);/*****************************************
|
|
2
|
+
*
|
|
3
|
+
* ⚡ Built by Storm Software
|
|
4
|
+
*
|
|
5
|
+
*****************************************/
|
|
6
|
+
|
|
7
|
+
var F=Object.defineProperty;var C=(e,s)=>F(e,"name",{value:s,configurable:true});const L=C((e={})=>({name:"jest",async config(){const s={$0:void 0,_:[],coverage:e.codeCoverage,bail:e.bail,cache:true,cacheDirectory:join.joinPaths(this.cachePath,"jest"),ci:e.ci,color:e.colors??true,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??true,verbose:e.verbose,testResultsProcessor:e.testResultsProcessor,updateSnapshot:e.updateSnapshot,useStderr:e.useStderr,watch:e.watch,watchAll:e.watchAll,randomize:e.randomize};if(e.testFile&&s._.push(e.testFile),e.findRelatedTests){const a=e.findRelatedTests.map(r=>r.trim());s._.push(...a),s.findRelatedTests=true;}return e.coverageDirectory&&(s.coverageDirectory=join.joinPaths(this.workspaceConfig.workspaceRoot,e.coverageDirectory)),e.clearCache&&(s.clearCache=true),e.reporters&&e.reporters.length>0&&(s.reporters=e.reporters),Array.isArray(e.coverageReporters)&&e.coverageReporters.length>0&&(s.coverageReporters=e.coverageReporters),{test:{jest:s}}},async test(){if(this.config.test.jest){const{results:s}=await jest.runCLI(this.config.test.jest,[join.joinPaths(this.workspaceConfig.workspaceRoot,this.config.projectRoot)]),a=s.snapshot,r=a.added,g=a.unmatched,o=a.unchecked,n=a.filesRemoved,l=a.didUpdate,h=a.matched,v=a.total,m=a.updated,d=s.numFailedTestSuites,c=s.numPassedTestSuites,f=s.numPendingTestSuites,$=d+c,i=s.testResults.length,P=s.numFailedTests,T=s.numPassedTests,b=s.numPendingTests,p=s.numTodoTests,w=s.numTotalTests,y=`${t__default.default.bold("Test Suites: ")+(d?`${t__default.default.bold(t__default.default.red(`${d} failed`))}, `:"")+(f?`${t__default.default.bold(t__default.default.yellow(`${f} skipped`))}, `:"")+(c?`${t__default.default.bold(t__default.default.green(`${c} passed`))}, `:"")+($!==i?`${$} of ${i}`:i)} total`,x=`${t__default.default.bold("Tests: ")+(P>0?`${t__default.default.bold(t__default.default.red(`${P} failed`))}, `:"")+(b>0?`${t__default.default.bold(t__default.default.yellow(`${b} skipped`))}, `:"")+(p>0?`${t__default.default.bold(t__default.default.magenta(`${p} todo`))}, `:"")+(T>0?`${t__default.default.bold(t__default.default.green(`${T} passed`))}, `:"")}${w} total`,k=`${t__default.default.bold("Snapshots: ")+(g?`${t__default.default.bold(t__default.default.red(`${g} failed`))}, `:"")+(o&&!l?`${t__default.default.bold(t__default.default.yellow(`${o} obsolete`))}, `:"")+(o&&l?`${t__default.default.bold(t__default.default.green(`${o} removed`))}, `:"")+(n&&!l?`${t__default.default.bold(t__default.default.yellow(`${jestUtil.pluralize("file",n)} obsolete`))}, `:"")+(n&&l?`${t__default.default.bold(t__default.default.green(`${jestUtil.pluralize("file",n)} removed`))}, `:"")+(m?`${t__default.default.bold(t__default.default.green(`${m} updated`))}, `:"")+(r?`${t__default.default.bold(t__default.default.green(`${r} written`))}, `:"")+(h?`${t__default.default.bold(t__default.default.green(`${h} passed`))}, `:"")}${v} total`;this.log(types$1.LogLevelLabel.INFO,`
|
|
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]}})});
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { J as JestPluginContext, a as JestPluginOptions, P as Plugin } from '../index-BwByTg_8.cjs';
|
|
2
|
+
export { c as JestPluginResolvedConfig, b as JestPluginUserConfig } from '../index-BwByTg_8.cjs';
|
|
3
|
+
import '@jest/types';
|
|
4
|
+
import '@storm-software/build-tools/types';
|
|
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/types/package-json';
|
|
13
|
+
import 'jiti';
|
|
14
|
+
import 'oxc-parser';
|
|
15
|
+
import 'semver';
|
|
16
|
+
import 'unplugin';
|
|
17
|
+
import '@stryke/types/tsconfig';
|
|
18
|
+
import 'typescript';
|
|
19
|
+
import '@stryke/json/types';
|
|
20
|
+
import 'memfs';
|
|
21
|
+
import 'node:fs';
|
|
22
|
+
import 'unionfs';
|
|
23
|
+
import '@stryke/types/array';
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Jest plugin for Powerlines.
|
|
27
|
+
*
|
|
28
|
+
* @param options - The Jest plugin user configuration options.
|
|
29
|
+
* @returns A Powerlines plugin that integrates Jest testing.
|
|
30
|
+
*/
|
|
31
|
+
declare const plugin: <TContext extends JestPluginContext = JestPluginContext>(options?: JestPluginOptions) => Plugin<TContext>;
|
|
32
|
+
|
|
33
|
+
export { JestPluginContext, JestPluginOptions, plugin as default, plugin };
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { J as JestPluginContext, a as JestPluginOptions, P as Plugin } from '../index-BwByTg_8.js';
|
|
2
|
+
export { c as JestPluginResolvedConfig, b as JestPluginUserConfig } from '../index-BwByTg_8.js';
|
|
3
|
+
import '@jest/types';
|
|
4
|
+
import '@storm-software/build-tools/types';
|
|
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/types/package-json';
|
|
13
|
+
import 'jiti';
|
|
14
|
+
import 'oxc-parser';
|
|
15
|
+
import 'semver';
|
|
16
|
+
import 'unplugin';
|
|
17
|
+
import '@stryke/types/tsconfig';
|
|
18
|
+
import 'typescript';
|
|
19
|
+
import '@stryke/json/types';
|
|
20
|
+
import 'memfs';
|
|
21
|
+
import 'node:fs';
|
|
22
|
+
import 'unionfs';
|
|
23
|
+
import '@stryke/types/array';
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Jest plugin for Powerlines.
|
|
27
|
+
*
|
|
28
|
+
* @param options - The Jest plugin user configuration options.
|
|
29
|
+
* @returns A Powerlines plugin that integrates Jest testing.
|
|
30
|
+
*/
|
|
31
|
+
declare const plugin: <TContext extends JestPluginContext = JestPluginContext>(options?: JestPluginOptions) => Plugin<TContext>;
|
|
32
|
+
|
|
33
|
+
export { JestPluginContext, JestPluginOptions, plugin as default, plugin };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import {LogLevelLabel}from'@storm-software/config-tools/types';import {joinPaths}from'@stryke/path/join';import t from'chalk';import {runCLI}from'jest';import {pluralize,formatTime}from'jest-util';export*from'./types';/*****************************************
|
|
2
|
+
*
|
|
3
|
+
* ⚡ Built by Storm Software
|
|
4
|
+
*
|
|
5
|
+
*****************************************/
|
|
6
|
+
|
|
7
|
+
var F=Object.defineProperty;var C=(e,s)=>F(e,"name",{value:s,configurable:true});const L=C((e={})=>({name:"jest",async config(){const s={$0:void 0,_:[],coverage:e.codeCoverage,bail:e.bail,cache:true,cacheDirectory:joinPaths(this.cachePath,"jest"),ci:e.ci,color:e.colors??true,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??true,verbose:e.verbose,testResultsProcessor:e.testResultsProcessor,updateSnapshot:e.updateSnapshot,useStderr:e.useStderr,watch:e.watch,watchAll:e.watchAll,randomize:e.randomize};if(e.testFile&&s._.push(e.testFile),e.findRelatedTests){const a=e.findRelatedTests.map(r=>r.trim());s._.push(...a),s.findRelatedTests=true;}return e.coverageDirectory&&(s.coverageDirectory=joinPaths(this.workspaceConfig.workspaceRoot,e.coverageDirectory)),e.clearCache&&(s.clearCache=true),e.reporters&&e.reporters.length>0&&(s.reporters=e.reporters),Array.isArray(e.coverageReporters)&&e.coverageReporters.length>0&&(s.coverageReporters=e.coverageReporters),{test:{jest:s}}},async test(){if(this.config.test.jest){const{results:s}=await runCLI(this.config.test.jest,[joinPaths(this.workspaceConfig.workspaceRoot,this.config.projectRoot)]),a=s.snapshot,r=a.added,g=a.unmatched,o=a.unchecked,n=a.filesRemoved,l=a.didUpdate,h=a.matched,v=a.total,m=a.updated,d=s.numFailedTestSuites,c=s.numPassedTestSuites,f=s.numPendingTestSuites,$=d+c,i=s.testResults.length,P=s.numFailedTests,T=s.numPassedTests,b=s.numPendingTests,p=s.numTodoTests,w=s.numTotalTests,y=`${t.bold("Test Suites: ")+(d?`${t.bold(t.red(`${d} failed`))}, `:"")+(f?`${t.bold(t.yellow(`${f} skipped`))}, `:"")+(c?`${t.bold(t.green(`${c} passed`))}, `:"")+($!==i?`${$} of ${i}`:i)} total`,x=`${t.bold("Tests: ")+(P>0?`${t.bold(t.red(`${P} failed`))}, `:"")+(b>0?`${t.bold(t.yellow(`${b} skipped`))}, `:"")+(p>0?`${t.bold(t.magenta(`${p} todo`))}, `:"")+(T>0?`${t.bold(t.green(`${T} passed`))}, `:"")}${w} total`,k=`${t.bold("Snapshots: ")+(g?`${t.bold(t.red(`${g} failed`))}, `:"")+(o&&!l?`${t.bold(t.yellow(`${o} obsolete`))}, `:"")+(o&&l?`${t.bold(t.green(`${o} removed`))}, `:"")+(n&&!l?`${t.bold(t.yellow(`${pluralize("file",n)} obsolete`))}, `:"")+(n&&l?`${t.bold(t.green(`${pluralize("file",n)} removed`))}, `:"")+(m?`${t.bold(t.green(`${m} updated`))}, `:"")+(r?`${t.bold(t.green(`${r} written`))}, `:"")+(h?`${t.bold(t.green(`${h} passed`))}, `:"")}${v} total`;this.log(LogLevelLabel.INFO,`
|
|
8
|
+
${t.bold("Test result summary:")}
|
|
9
|
+
${y}
|
|
10
|
+
${x}
|
|
11
|
+
${k}
|
|
12
|
+
${t.bold("Time:")} ${formatTime((Date.now()-s.startTime)/1e3)}
|
|
13
|
+
`);}}}),"plugin");var Q=L;export{Q as default,L as plugin};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';var plugin=require('./plugin');Object.keys(plugin).forEach(function(k){if(k!=='default'&&!Object.prototype.hasOwnProperty.call(exports,k))Object.defineProperty(exports,k,{enumerable:true,get:function(){return plugin[k]}})});
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export { J as JestPluginContext, a as JestPluginOptions, c as JestPluginResolvedConfig, b as JestPluginUserConfig } from '../index-BwByTg_8.cjs';
|
|
2
|
+
import '@jest/types';
|
|
3
|
+
import '@storm-software/build-tools/types';
|
|
4
|
+
import '@storm-software/config-tools/types';
|
|
5
|
+
import '@storm-software/config/types';
|
|
6
|
+
import '@stryke/types/base';
|
|
7
|
+
import '@stryke/types/configuration';
|
|
8
|
+
import '@stryke/types/file';
|
|
9
|
+
import 'vite';
|
|
10
|
+
import '@stryke/env/get-env-paths';
|
|
11
|
+
import '@stryke/types/package-json';
|
|
12
|
+
import 'jiti';
|
|
13
|
+
import 'oxc-parser';
|
|
14
|
+
import 'semver';
|
|
15
|
+
import 'unplugin';
|
|
16
|
+
import '@stryke/types/tsconfig';
|
|
17
|
+
import 'typescript';
|
|
18
|
+
import '@stryke/json/types';
|
|
19
|
+
import 'memfs';
|
|
20
|
+
import 'node:fs';
|
|
21
|
+
import 'unionfs';
|
|
22
|
+
import '@stryke/types/array';
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export { J as JestPluginContext, a as JestPluginOptions, c as JestPluginResolvedConfig, b as JestPluginUserConfig } from '../index-BwByTg_8.js';
|
|
2
|
+
import '@jest/types';
|
|
3
|
+
import '@storm-software/build-tools/types';
|
|
4
|
+
import '@storm-software/config-tools/types';
|
|
5
|
+
import '@storm-software/config/types';
|
|
6
|
+
import '@stryke/types/base';
|
|
7
|
+
import '@stryke/types/configuration';
|
|
8
|
+
import '@stryke/types/file';
|
|
9
|
+
import 'vite';
|
|
10
|
+
import '@stryke/env/get-env-paths';
|
|
11
|
+
import '@stryke/types/package-json';
|
|
12
|
+
import 'jiti';
|
|
13
|
+
import 'oxc-parser';
|
|
14
|
+
import 'semver';
|
|
15
|
+
import 'unplugin';
|
|
16
|
+
import '@stryke/types/tsconfig';
|
|
17
|
+
import 'typescript';
|
|
18
|
+
import '@stryke/json/types';
|
|
19
|
+
import 'memfs';
|
|
20
|
+
import 'node:fs';
|
|
21
|
+
import 'unionfs';
|
|
22
|
+
import '@stryke/types/array';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export*from'./plugin';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import '@jest/types';
|
|
2
|
+
export { J as JestPluginContext, a as JestPluginOptions, c as JestPluginResolvedConfig, b as JestPluginUserConfig } from '../index-BwByTg_8.cjs';
|
|
3
|
+
import '@storm-software/build-tools/types';
|
|
4
|
+
import '@storm-software/config-tools/types';
|
|
5
|
+
import '@storm-software/config/types';
|
|
6
|
+
import '@stryke/types/base';
|
|
7
|
+
import '@stryke/types/configuration';
|
|
8
|
+
import '@stryke/types/file';
|
|
9
|
+
import 'vite';
|
|
10
|
+
import '@stryke/env/get-env-paths';
|
|
11
|
+
import '@stryke/types/package-json';
|
|
12
|
+
import 'jiti';
|
|
13
|
+
import 'oxc-parser';
|
|
14
|
+
import 'semver';
|
|
15
|
+
import 'unplugin';
|
|
16
|
+
import '@stryke/types/tsconfig';
|
|
17
|
+
import 'typescript';
|
|
18
|
+
import '@stryke/json/types';
|
|
19
|
+
import 'memfs';
|
|
20
|
+
import 'node:fs';
|
|
21
|
+
import 'unionfs';
|
|
22
|
+
import '@stryke/types/array';
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import '@jest/types';
|
|
2
|
+
export { J as JestPluginContext, a as JestPluginOptions, c as JestPluginResolvedConfig, b as JestPluginUserConfig } from '../index-BwByTg_8.js';
|
|
3
|
+
import '@storm-software/build-tools/types';
|
|
4
|
+
import '@storm-software/config-tools/types';
|
|
5
|
+
import '@storm-software/config/types';
|
|
6
|
+
import '@stryke/types/base';
|
|
7
|
+
import '@stryke/types/configuration';
|
|
8
|
+
import '@stryke/types/file';
|
|
9
|
+
import 'vite';
|
|
10
|
+
import '@stryke/env/get-env-paths';
|
|
11
|
+
import '@stryke/types/package-json';
|
|
12
|
+
import 'jiti';
|
|
13
|
+
import 'oxc-parser';
|
|
14
|
+
import 'semver';
|
|
15
|
+
import 'unplugin';
|
|
16
|
+
import '@stryke/types/tsconfig';
|
|
17
|
+
import 'typescript';
|
|
18
|
+
import '@stryke/json/types';
|
|
19
|
+
import 'memfs';
|
|
20
|
+
import 'node:fs';
|
|
21
|
+
import 'unionfs';
|
|
22
|
+
import '@stryke/types/array';
|
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@powerlines/plugin-jest",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.8",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A package containing the Jest testing plugin for Powerlines.",
|
|
6
6
|
"repository": {
|
|
@@ -101,21 +101,21 @@
|
|
|
101
101
|
"dependencies": {
|
|
102
102
|
"@jest/reporters": "^30.2.0",
|
|
103
103
|
"@jest/test-result": "^30.2.0",
|
|
104
|
-
"@stryke/fs": "^0.32.
|
|
105
|
-
"@stryke/path": "^0.
|
|
104
|
+
"@stryke/fs": "^0.32.10",
|
|
105
|
+
"@stryke/path": "^0.18.5",
|
|
106
106
|
"chalk": "5.6.2",
|
|
107
107
|
"defu": "^6.1.4",
|
|
108
108
|
"jest": "^30.2.0",
|
|
109
109
|
"jest-config": "^30.2.0",
|
|
110
110
|
"jest-resolve": "^30.2.0",
|
|
111
111
|
"jest-util": "^30.2.0",
|
|
112
|
-
"powerlines": "^0.
|
|
112
|
+
"powerlines": "^0.16.0"
|
|
113
113
|
},
|
|
114
114
|
"devDependencies": {
|
|
115
115
|
"@jest/types": "^30.2.0",
|
|
116
|
-
"@powerlines/nx": "^0.
|
|
116
|
+
"@powerlines/nx": "^0.10.1",
|
|
117
117
|
"@types/jest": "^30.0.0"
|
|
118
118
|
},
|
|
119
119
|
"publishConfig": { "access": "public" },
|
|
120
|
-
"gitHead": "
|
|
120
|
+
"gitHead": "097e9f257b733719a3aead815ef79686f4c46f25"
|
|
121
121
|
}
|