@teambit/tester 1.0.210 → 1.0.211
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/artifacts/__bit_junit.xml +1 -1
- package/artifacts/preview/teambit_defender_tester-preview.js +1 -1
- package/artifacts/schema.json +251 -131
- package/dist/{preview-1711617900376.js → preview-1711682321261.js} +2 -2
- package/dist/tester.d.ts +8 -0
- package/dist/tester.js.map +1 -1
- package/package.json +11 -11
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.defender_tester@1.0.
|
|
2
|
-
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.defender_tester@1.0.
|
|
1
|
+
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.defender_tester@1.0.211/dist/tester.composition.js';
|
|
2
|
+
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.defender_tester@1.0.211/dist/tester.docs.mdx';
|
|
3
3
|
|
|
4
4
|
export const compositions = [compositions_0];
|
|
5
5
|
export const overview = [overview_0];
|
package/dist/tester.d.ts
CHANGED
|
@@ -64,6 +64,10 @@ export interface TesterContext extends ExecutionContext {
|
|
|
64
64
|
* list of spec files to test.
|
|
65
65
|
*/
|
|
66
66
|
specFiles: SpecFiles;
|
|
67
|
+
/**
|
|
68
|
+
* list of source spec files to test.
|
|
69
|
+
*/
|
|
70
|
+
sourceSpecFiles?: SpecFiles;
|
|
67
71
|
/**
|
|
68
72
|
* rootPath of the component workspace or the capsule root dir (during build).
|
|
69
73
|
*/
|
|
@@ -88,6 +92,10 @@ export interface TesterContext extends ExecutionContext {
|
|
|
88
92
|
* array of patterns to test.
|
|
89
93
|
*/
|
|
90
94
|
patterns: ComponentPatternsMap;
|
|
95
|
+
/**
|
|
96
|
+
* array of source files patterns to test.
|
|
97
|
+
*/
|
|
98
|
+
sourcePatterns?: ComponentPatternsMap;
|
|
91
99
|
/**
|
|
92
100
|
*
|
|
93
101
|
* additional test host dependencies
|
package/dist/tester.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Tests","constructor","components","errors","map","comp","flat","exports"],"sources":["tester.ts"],"sourcesContent":["import { Component, ComponentID, ComponentMap } from '@teambit/component';\nimport { ExecutionContext } from '@teambit/envs';\nimport { AbstractVinyl } from '@teambit/legacy/dist/consumer/component/sources';\nimport { TestsResult } from '@teambit/tests-results';\n\nexport class Tests {\n constructor(public components: ComponentsResults[]) {}\n get errors(): Error[] {\n return this.components.map((comp) => comp.errors || []).flat();\n }\n}\n\nexport type ComponentsResults = {\n /**\n * component id.\n */\n componentId: ComponentID;\n /**\n * test results for the component.\n */\n results?: TestsResult;\n /**\n * aggregated errors from all files\n */\n errors?: Error[];\n\n /**\n * loading.\n */\n loading?: boolean;\n};\n\nexport type SpecFiles = ComponentMap<AbstractVinyl[]>;\n\nexport type ComponentPatternsEntry = {\n /**\n * component directory in the workspace.\n */\n componentDir: string;\n\n /**\n * paths to test files.\n */\n paths: { path: string; relative: string }[];\n\n /**\n * root dir of the package in bit_roots.\n */\n packageRootDir: string;\n};\n\nexport type ComponentPatternsMap = ComponentMap<ComponentPatternsEntry>;\n\nexport interface TesterContext extends ExecutionContext {\n /**\n * whether the tester run for release (during bit build/tag) or not (during bit test command).\n */\n release: boolean;\n\n /**\n * list of components to test.\n */\n components: Component[];\n\n /**\n * component workspace.\n */\n // workspace: Workspace;\n\n /**\n * defines whether tester is expected to run in quiet mode.\n */\n quiet?: boolean;\n\n /**\n * list of spec files to test.\n */\n specFiles: SpecFiles;\n\n /**\n * rootPath of the component workspace or the capsule root dir (during build).\n */\n rootPath: string;\n\n /**\n * determines whether tester is expected to run in debug mode.\n */\n debug?: boolean;\n\n /**\n * is start from ui\n */\n ui?: boolean;\n\n /**\n * determines whether to start the tester in watch mode.\n */\n watch?: boolean;\n\n /**\n * whether the tester should show code coverage\n */\n coverage?: boolean;\n\n /**\n * array of patterns to test.\n */\n patterns: ComponentPatternsMap;\n\n /**\n *\n * additional test host dependencies\n * This can be used in cases when you want specific dependencies to be resolved from the env during testing\n * but you don't want these dependencies as peer dependencies of the component (as they are not used during runtime)\n * An example for this is @angular/compiler, which during running tests you want to resolve from the env, but you don't\n * need it during component runtime.\n */\n additionalHostDependencies?: string[];\n}\n\n/**\n * tester interface allows extensions to implement a component tester into bit.\n */\nexport interface Tester {\n /**\n * display name of the tester.\n */\n displayName?: string;\n\n /**\n * icon of the tester.\n */\n icon?: string;\n\n /**\n * serialized config of the tester.\n */\n displayConfig?(): string;\n\n /**\n * path to the config in the filesystem.\n */\n configPath?: string;\n\n /**\n * id of the tester.\n */\n id: string;\n\n /**\n * on test run complete. (applies only during watch)\n * @param callback\n */\n onTestRunComplete?(callback: CallbackFn): Promise<void>;\n\n /**\n * execute tests on all components in the given execution context.\n */\n test(context: TesterContext): Promise<Tests>;\n\n /**\n * watch tests on all components\n */\n watch?(context: TesterContext): Promise<Tests>;\n\n /**\n * return the tester version.\n */\n version(): string;\n}\n\nexport type CallbackFn = (testSuite: Tests) => void;\n"],"mappings":";;;;;;AAKO,MAAMA,KAAK,CAAC;EACjBC,WAAWA,CAAQC,UAA+B,EAAE;IAAA,KAAjCA,UAA+B,GAA/BA,UAA+B;EAAG;EACrD,IAAIC,MAAMA,CAAA,EAAY;IACpB,OAAO,IAAI,CAACD,UAAU,CAACE,GAAG,CAAEC,IAAI,IAAKA,IAAI,CAACF,MAAM,IAAI,EAAE,CAAC,CAACG,IAAI,CAAC,CAAC;EAChE;AACF;;
|
|
1
|
+
{"version":3,"names":["Tests","constructor","components","errors","map","comp","flat","exports"],"sources":["tester.ts"],"sourcesContent":["import { Component, ComponentID, ComponentMap } from '@teambit/component';\nimport { ExecutionContext } from '@teambit/envs';\nimport { AbstractVinyl } from '@teambit/legacy/dist/consumer/component/sources';\nimport { TestsResult } from '@teambit/tests-results';\n\nexport class Tests {\n constructor(public components: ComponentsResults[]) {}\n get errors(): Error[] {\n return this.components.map((comp) => comp.errors || []).flat();\n }\n}\n\nexport type ComponentsResults = {\n /**\n * component id.\n */\n componentId: ComponentID;\n /**\n * test results for the component.\n */\n results?: TestsResult;\n /**\n * aggregated errors from all files\n */\n errors?: Error[];\n\n /**\n * loading.\n */\n loading?: boolean;\n};\n\nexport type SpecFiles = ComponentMap<AbstractVinyl[]>;\n\nexport type ComponentPatternsEntry = {\n /**\n * component directory in the workspace.\n */\n componentDir: string;\n\n /**\n * paths to test files.\n */\n paths: { path: string; relative: string }[];\n\n /**\n * root dir of the package in bit_roots.\n */\n packageRootDir: string;\n};\n\nexport type ComponentPatternsMap = ComponentMap<ComponentPatternsEntry>;\n\nexport interface TesterContext extends ExecutionContext {\n /**\n * whether the tester run for release (during bit build/tag) or not (during bit test command).\n */\n release: boolean;\n\n /**\n * list of components to test.\n */\n components: Component[];\n\n /**\n * component workspace.\n */\n // workspace: Workspace;\n\n /**\n * defines whether tester is expected to run in quiet mode.\n */\n quiet?: boolean;\n\n /**\n * list of spec files to test.\n */\n specFiles: SpecFiles;\n\n /**\n * list of source spec files to test.\n */\n sourceSpecFiles?: SpecFiles;\n\n /**\n * rootPath of the component workspace or the capsule root dir (during build).\n */\n rootPath: string;\n\n /**\n * determines whether tester is expected to run in debug mode.\n */\n debug?: boolean;\n\n /**\n * is start from ui\n */\n ui?: boolean;\n\n /**\n * determines whether to start the tester in watch mode.\n */\n watch?: boolean;\n\n /**\n * whether the tester should show code coverage\n */\n coverage?: boolean;\n\n /**\n * array of patterns to test.\n */\n patterns: ComponentPatternsMap;\n\n /**\n * array of source files patterns to test.\n */\n sourcePatterns?: ComponentPatternsMap;\n\n /**\n *\n * additional test host dependencies\n * This can be used in cases when you want specific dependencies to be resolved from the env during testing\n * but you don't want these dependencies as peer dependencies of the component (as they are not used during runtime)\n * An example for this is @angular/compiler, which during running tests you want to resolve from the env, but you don't\n * need it during component runtime.\n */\n additionalHostDependencies?: string[];\n}\n\n/**\n * tester interface allows extensions to implement a component tester into bit.\n */\nexport interface Tester {\n /**\n * display name of the tester.\n */\n displayName?: string;\n\n /**\n * icon of the tester.\n */\n icon?: string;\n\n /**\n * serialized config of the tester.\n */\n displayConfig?(): string;\n\n /**\n * path to the config in the filesystem.\n */\n configPath?: string;\n\n /**\n * id of the tester.\n */\n id: string;\n\n /**\n * on test run complete. (applies only during watch)\n * @param callback\n */\n onTestRunComplete?(callback: CallbackFn): Promise<void>;\n\n /**\n * execute tests on all components in the given execution context.\n */\n test(context: TesterContext): Promise<Tests>;\n\n /**\n * watch tests on all components\n */\n watch?(context: TesterContext): Promise<Tests>;\n\n /**\n * return the tester version.\n */\n version(): string;\n}\n\nexport type CallbackFn = (testSuite: Tests) => void;\n"],"mappings":";;;;;;AAKO,MAAMA,KAAK,CAAC;EACjBC,WAAWA,CAAQC,UAA+B,EAAE;IAAA,KAAjCA,UAA+B,GAA/BA,UAA+B;EAAG;EACrD,IAAIC,MAAMA,CAAA,EAAY;IACpB,OAAO,IAAI,CAACD,UAAU,CAACE,GAAG,CAAEC,IAAI,IAAKA,IAAI,CAACF,MAAM,IAAI,EAAE,CAAC,CAACG,IAAI,CAAC,CAAC;EAChE;AACF;;AAwHA;AACA;AACA;AAFAC,OAAA,CAAAP,KAAA,GAAAA,KAAA","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teambit/tester",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.211",
|
|
4
4
|
"homepage": "https://bit.cloud/teambit/defender/tester",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"componentId": {
|
|
7
7
|
"scope": "teambit.defender",
|
|
8
8
|
"name": "tester",
|
|
9
|
-
"version": "1.0.
|
|
9
|
+
"version": "1.0.211"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"chalk": "2.4.2",
|
|
@@ -25,15 +25,15 @@
|
|
|
25
25
|
"@teambit/bit-error": "0.0.404",
|
|
26
26
|
"@teambit/cli": "0.0.858",
|
|
27
27
|
"@teambit/logger": "0.0.951",
|
|
28
|
-
"@teambit/workspace": "1.0.
|
|
29
|
-
"@teambit/envs": "1.0.
|
|
30
|
-
"@teambit/component": "1.0.
|
|
31
|
-
"@teambit/graphql": "1.0.
|
|
32
|
-
"@teambit/builder": "1.0.
|
|
33
|
-
"@teambit/dev-files": "1.0.
|
|
34
|
-
"@teambit/ui": "1.0.
|
|
35
|
-
"@teambit/compiler": "1.0.
|
|
36
|
-
"@teambit/component-compare": "1.0.
|
|
28
|
+
"@teambit/workspace": "1.0.211",
|
|
29
|
+
"@teambit/envs": "1.0.211",
|
|
30
|
+
"@teambit/component": "1.0.211",
|
|
31
|
+
"@teambit/graphql": "1.0.211",
|
|
32
|
+
"@teambit/builder": "1.0.211",
|
|
33
|
+
"@teambit/dev-files": "1.0.211",
|
|
34
|
+
"@teambit/ui": "1.0.211",
|
|
35
|
+
"@teambit/compiler": "1.0.211",
|
|
36
|
+
"@teambit/component-compare": "1.0.211",
|
|
37
37
|
"@teambit/defender.ui.test-compare": "0.0.262",
|
|
38
38
|
"@teambit/defender.ui.test-page": "0.0.40"
|
|
39
39
|
},
|