@teambit/tester 1.0.227 → 1.0.229
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 +321 -67
- package/dist/exceptions/index.d.ts +2 -0
- package/dist/exceptions/no-matching-components.d.ts +3 -0
- package/dist/exceptions/no-test-files-found.d.ts +4 -0
- package/dist/index.d.ts +8 -0
- package/dist/{preview-1712719054377.js → preview-1712822929999.js} +2 -2
- package/dist/test.cmd.d.ts +35 -0
- package/dist/tester-env.d.ts +5 -0
- package/dist/tester.aspect.d.ts +3 -0
- package/dist/tester.composition.d.ts +1 -0
- package/dist/tester.d.ts +151 -0
- package/dist/tester.graphql.d.ts +3 -0
- package/dist/tester.main.runtime.d.ts +152 -0
- package/dist/tester.service.d.ts +51 -0
- package/dist/tester.task.d.ts +19 -0
- package/dist/tester.ui.runtime.d.ts +21 -0
- package/dist/tests.section.d.ts +15 -0
- package/dist/utils/detect-spec-files.d.ts +6 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/junit-generator.d.ts +2 -0
- package/package.json +14 -14
- package/tsconfig.json +1 -37
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { TesterAspect } from './tester.aspect';
|
|
2
|
+
export { Tests } from './tester';
|
|
3
|
+
export type { TesterEnv } from './tester-env';
|
|
4
|
+
export type { Tester, TesterContext, CallbackFn, SpecFiles, ComponentPatternsMap, ComponentsResults, ComponentPatternsEntry, } from './tester';
|
|
5
|
+
export type { TesterMain } from './tester.main.runtime';
|
|
6
|
+
export type { TesterUI, EmptyStateSlot } from './tester.ui.runtime';
|
|
7
|
+
export { TesterAspect };
|
|
8
|
+
export default TesterAspect;
|
|
@@ -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.229/dist/tester.composition.js';
|
|
2
|
+
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.defender_tester@1.0.229/dist/tester.docs.mdx';
|
|
3
3
|
|
|
4
4
|
export const compositions = [compositions_0];
|
|
5
5
|
export const overview = [overview_0];
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { Command, CommandOptions } from '@teambit/cli';
|
|
2
|
+
import { Logger } from '@teambit/logger';
|
|
3
|
+
import { Workspace } from '@teambit/workspace';
|
|
4
|
+
import type { TesterMain } from './tester.main.runtime';
|
|
5
|
+
type TestFlags = {
|
|
6
|
+
watch: boolean;
|
|
7
|
+
debug: boolean;
|
|
8
|
+
all: boolean;
|
|
9
|
+
unmodified: boolean;
|
|
10
|
+
env?: string;
|
|
11
|
+
scope?: string;
|
|
12
|
+
junit?: string;
|
|
13
|
+
coverage?: boolean;
|
|
14
|
+
};
|
|
15
|
+
export declare class TestCmd implements Command {
|
|
16
|
+
private tester;
|
|
17
|
+
private workspace;
|
|
18
|
+
private logger;
|
|
19
|
+
name: string;
|
|
20
|
+
description: string;
|
|
21
|
+
helpUrl: string;
|
|
22
|
+
arguments: {
|
|
23
|
+
name: string;
|
|
24
|
+
description: string;
|
|
25
|
+
}[];
|
|
26
|
+
alias: string;
|
|
27
|
+
group: string;
|
|
28
|
+
options: CommandOptions;
|
|
29
|
+
constructor(tester: TesterMain, workspace: Workspace, logger: Logger);
|
|
30
|
+
report([userPattern]: [string], { watch, debug, all, env, scope, junit, coverage, unmodified }: TestFlags): Promise<"" | {
|
|
31
|
+
code: number;
|
|
32
|
+
data: string;
|
|
33
|
+
}>;
|
|
34
|
+
}
|
|
35
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const Logo: () => import("react/jsx-runtime").JSX.Element;
|
package/dist/tester.d.ts
ADDED
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
import { Component, ComponentID, ComponentMap } from '@teambit/component';
|
|
2
|
+
import { ExecutionContext } from '@teambit/envs';
|
|
3
|
+
import { AbstractVinyl } from '@teambit/legacy/dist/consumer/component/sources';
|
|
4
|
+
import { TestsResult } from '@teambit/tests-results';
|
|
5
|
+
export declare class Tests {
|
|
6
|
+
components: ComponentsResults[];
|
|
7
|
+
constructor(components: ComponentsResults[]);
|
|
8
|
+
get errors(): Error[];
|
|
9
|
+
}
|
|
10
|
+
export type ComponentsResults = {
|
|
11
|
+
/**
|
|
12
|
+
* component id.
|
|
13
|
+
*/
|
|
14
|
+
componentId: ComponentID;
|
|
15
|
+
/**
|
|
16
|
+
* test results for the component.
|
|
17
|
+
*/
|
|
18
|
+
results?: TestsResult;
|
|
19
|
+
/**
|
|
20
|
+
* aggregated errors from all files
|
|
21
|
+
*/
|
|
22
|
+
errors?: Error[];
|
|
23
|
+
/**
|
|
24
|
+
* loading.
|
|
25
|
+
*/
|
|
26
|
+
loading?: boolean;
|
|
27
|
+
};
|
|
28
|
+
export type SpecFiles = ComponentMap<AbstractVinyl[]>;
|
|
29
|
+
export type ComponentPatternsEntry = {
|
|
30
|
+
/**
|
|
31
|
+
* component directory in the workspace.
|
|
32
|
+
*/
|
|
33
|
+
componentDir: string;
|
|
34
|
+
/**
|
|
35
|
+
* paths to test files.
|
|
36
|
+
*/
|
|
37
|
+
paths: {
|
|
38
|
+
path: string;
|
|
39
|
+
relative: string;
|
|
40
|
+
}[];
|
|
41
|
+
/**
|
|
42
|
+
* root dir of the package in bit_roots.
|
|
43
|
+
*/
|
|
44
|
+
packageRootDir: string;
|
|
45
|
+
};
|
|
46
|
+
export type ComponentPatternsMap = ComponentMap<ComponentPatternsEntry>;
|
|
47
|
+
export interface TesterContext extends ExecutionContext {
|
|
48
|
+
/**
|
|
49
|
+
* whether the tester run for release (during bit build/tag) or not (during bit test command).
|
|
50
|
+
*/
|
|
51
|
+
release: boolean;
|
|
52
|
+
/**
|
|
53
|
+
* list of components to test.
|
|
54
|
+
*/
|
|
55
|
+
components: Component[];
|
|
56
|
+
/**
|
|
57
|
+
* component workspace.
|
|
58
|
+
*/
|
|
59
|
+
/**
|
|
60
|
+
* defines whether tester is expected to run in quiet mode.
|
|
61
|
+
*/
|
|
62
|
+
quiet?: boolean;
|
|
63
|
+
/**
|
|
64
|
+
* list of spec files to test.
|
|
65
|
+
*/
|
|
66
|
+
specFiles: SpecFiles;
|
|
67
|
+
/**
|
|
68
|
+
* list of source spec files to test.
|
|
69
|
+
*/
|
|
70
|
+
sourceSpecFiles?: SpecFiles;
|
|
71
|
+
/**
|
|
72
|
+
* rootPath of the component workspace or the capsule root dir (during build).
|
|
73
|
+
*/
|
|
74
|
+
rootPath: string;
|
|
75
|
+
/**
|
|
76
|
+
* determines whether tester is expected to run in debug mode.
|
|
77
|
+
*/
|
|
78
|
+
debug?: boolean;
|
|
79
|
+
/**
|
|
80
|
+
* is start from ui
|
|
81
|
+
*/
|
|
82
|
+
ui?: boolean;
|
|
83
|
+
/**
|
|
84
|
+
* determines whether to start the tester in watch mode.
|
|
85
|
+
*/
|
|
86
|
+
watch?: boolean;
|
|
87
|
+
/**
|
|
88
|
+
* whether the tester should show code coverage
|
|
89
|
+
*/
|
|
90
|
+
coverage?: boolean;
|
|
91
|
+
/**
|
|
92
|
+
* array of patterns to test.
|
|
93
|
+
*/
|
|
94
|
+
patterns: ComponentPatternsMap;
|
|
95
|
+
/**
|
|
96
|
+
* array of source files patterns to test.
|
|
97
|
+
*/
|
|
98
|
+
sourcePatterns?: ComponentPatternsMap;
|
|
99
|
+
/**
|
|
100
|
+
*
|
|
101
|
+
* additional test host dependencies
|
|
102
|
+
* This can be used in cases when you want specific dependencies to be resolved from the env during testing
|
|
103
|
+
* but you don't want these dependencies as peer dependencies of the component (as they are not used during runtime)
|
|
104
|
+
* An example for this is @angular/compiler, which during running tests you want to resolve from the env, but you don't
|
|
105
|
+
* need it during component runtime.
|
|
106
|
+
*/
|
|
107
|
+
additionalHostDependencies?: string[];
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* tester interface allows extensions to implement a component tester into bit.
|
|
111
|
+
*/
|
|
112
|
+
export interface Tester {
|
|
113
|
+
/**
|
|
114
|
+
* display name of the tester.
|
|
115
|
+
*/
|
|
116
|
+
displayName?: string;
|
|
117
|
+
/**
|
|
118
|
+
* icon of the tester.
|
|
119
|
+
*/
|
|
120
|
+
icon?: string;
|
|
121
|
+
/**
|
|
122
|
+
* serialized config of the tester.
|
|
123
|
+
*/
|
|
124
|
+
displayConfig?(): string;
|
|
125
|
+
/**
|
|
126
|
+
* path to the config in the filesystem.
|
|
127
|
+
*/
|
|
128
|
+
configPath?: string;
|
|
129
|
+
/**
|
|
130
|
+
* id of the tester.
|
|
131
|
+
*/
|
|
132
|
+
id: string;
|
|
133
|
+
/**
|
|
134
|
+
* on test run complete. (applies only during watch)
|
|
135
|
+
* @param callback
|
|
136
|
+
*/
|
|
137
|
+
onTestRunComplete?(callback: CallbackFn): Promise<void>;
|
|
138
|
+
/**
|
|
139
|
+
* execute tests on all components in the given execution context.
|
|
140
|
+
*/
|
|
141
|
+
test(context: TesterContext): Promise<Tests>;
|
|
142
|
+
/**
|
|
143
|
+
* watch tests on all components
|
|
144
|
+
*/
|
|
145
|
+
watch?(context: TesterContext): Promise<Tests>;
|
|
146
|
+
/**
|
|
147
|
+
* return the tester version.
|
|
148
|
+
*/
|
|
149
|
+
version(): string;
|
|
150
|
+
}
|
|
151
|
+
export type CallbackFn = (testSuite: Tests) => void;
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
import { CLIMain } from '@teambit/cli';
|
|
2
|
+
import { Component, IComponent } from '@teambit/component';
|
|
3
|
+
import { EnvsExecutionResult, EnvsMain } from '@teambit/envs';
|
|
4
|
+
import { LoggerMain } from '@teambit/logger';
|
|
5
|
+
import { Workspace } from '@teambit/workspace';
|
|
6
|
+
import { GraphqlMain } from '@teambit/graphql';
|
|
7
|
+
import { BuilderMain } from '@teambit/builder';
|
|
8
|
+
import { UiMain } from '@teambit/ui';
|
|
9
|
+
import { DevFilesMain } from '@teambit/dev-files';
|
|
10
|
+
import { TestsResult } from '@teambit/tests-results';
|
|
11
|
+
import { ComponentsResults, CallbackFn, Tests } from './tester';
|
|
12
|
+
import { TesterService } from './tester.service';
|
|
13
|
+
import { TesterTask } from './tester.task';
|
|
14
|
+
export type TesterExtensionConfig = {
|
|
15
|
+
/**
|
|
16
|
+
* regex of the text environment.
|
|
17
|
+
*/
|
|
18
|
+
testRegex: string;
|
|
19
|
+
/**
|
|
20
|
+
* determine whether to watch on start.
|
|
21
|
+
*/
|
|
22
|
+
watchOnStart: boolean;
|
|
23
|
+
patterns: string[];
|
|
24
|
+
};
|
|
25
|
+
export type TesterOptions = {
|
|
26
|
+
/**
|
|
27
|
+
* start the tester in watch mode.
|
|
28
|
+
*/
|
|
29
|
+
watch: boolean;
|
|
30
|
+
/**
|
|
31
|
+
* start the tester in debug mode.
|
|
32
|
+
*/
|
|
33
|
+
debug: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* start the tester in debug mode.
|
|
36
|
+
*/
|
|
37
|
+
ui?: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* initiate the tester on given env.
|
|
40
|
+
*/
|
|
41
|
+
env?: string;
|
|
42
|
+
/**
|
|
43
|
+
* generate JUnit files on the specified dir
|
|
44
|
+
*/
|
|
45
|
+
junit?: string;
|
|
46
|
+
/**
|
|
47
|
+
* show code coverage
|
|
48
|
+
*/
|
|
49
|
+
coverage?: boolean;
|
|
50
|
+
callback?: CallbackFn;
|
|
51
|
+
};
|
|
52
|
+
export declare class TesterMain {
|
|
53
|
+
private patterns;
|
|
54
|
+
/**
|
|
55
|
+
* graphql extension.
|
|
56
|
+
*/
|
|
57
|
+
private graphql;
|
|
58
|
+
/**
|
|
59
|
+
* envs extension.
|
|
60
|
+
*/
|
|
61
|
+
private envs;
|
|
62
|
+
/**
|
|
63
|
+
* workspace extension.
|
|
64
|
+
*/
|
|
65
|
+
private workspace;
|
|
66
|
+
/**
|
|
67
|
+
* tester service.
|
|
68
|
+
*/
|
|
69
|
+
readonly service: TesterService;
|
|
70
|
+
/**
|
|
71
|
+
* build task.
|
|
72
|
+
*/
|
|
73
|
+
readonly task: TesterTask;
|
|
74
|
+
private devFiles;
|
|
75
|
+
private builder;
|
|
76
|
+
static runtime: import("@teambit/harmony").RuntimeDefinition;
|
|
77
|
+
static dependencies: import("@teambit/harmony").Aspect[];
|
|
78
|
+
constructor(patterns: string[],
|
|
79
|
+
/**
|
|
80
|
+
* graphql extension.
|
|
81
|
+
*/
|
|
82
|
+
graphql: GraphqlMain,
|
|
83
|
+
/**
|
|
84
|
+
* envs extension.
|
|
85
|
+
*/
|
|
86
|
+
envs: EnvsMain,
|
|
87
|
+
/**
|
|
88
|
+
* workspace extension.
|
|
89
|
+
*/
|
|
90
|
+
workspace: Workspace,
|
|
91
|
+
/**
|
|
92
|
+
* tester service.
|
|
93
|
+
*/
|
|
94
|
+
service: TesterService,
|
|
95
|
+
/**
|
|
96
|
+
* build task.
|
|
97
|
+
*/
|
|
98
|
+
task: TesterTask, devFiles: DevFilesMain, builder: BuilderMain);
|
|
99
|
+
_testsResults: {
|
|
100
|
+
[componentId: string]: ComponentsResults;
|
|
101
|
+
} | undefined[];
|
|
102
|
+
test(components: Component[], opts?: TesterOptions): Promise<EnvsExecutionResult<Tests>>;
|
|
103
|
+
private generateJUnit;
|
|
104
|
+
/**
|
|
105
|
+
* watch all components for changes and test upon each.
|
|
106
|
+
*/
|
|
107
|
+
watch(components: Component[], opts?: TesterOptions): Promise<EnvsExecutionResult<Tests>>;
|
|
108
|
+
uiWatch(): Promise<EnvsExecutionResult<Tests>>;
|
|
109
|
+
getTestsResults(component: IComponent, idHasVersion?: boolean): Promise<{
|
|
110
|
+
testsResults?: TestsResult;
|
|
111
|
+
loading: boolean;
|
|
112
|
+
} | undefined>;
|
|
113
|
+
private getTestsResultsFromState;
|
|
114
|
+
/**
|
|
115
|
+
* Get the tests patterns from the config. (used as default patterns in case the env does not provide them via getTestsDevPatterns)
|
|
116
|
+
* @returns
|
|
117
|
+
*/
|
|
118
|
+
getPatterns(): string[];
|
|
119
|
+
getComponentDevPatterns(component: Component): {
|
|
120
|
+
name: string;
|
|
121
|
+
pattern: string[];
|
|
122
|
+
};
|
|
123
|
+
getDevPatternToRegister(): (component: Component) => {
|
|
124
|
+
name: string;
|
|
125
|
+
pattern: string[];
|
|
126
|
+
};
|
|
127
|
+
/**
|
|
128
|
+
* get all test files of a component.
|
|
129
|
+
*/
|
|
130
|
+
getTestFiles(component: Component): import("@teambit/legacy/dist/consumer/component/sources").AbstractVinyl[];
|
|
131
|
+
private getOptions;
|
|
132
|
+
static defaultConfig: {
|
|
133
|
+
/**
|
|
134
|
+
* default test regex for which files tester to apply on.
|
|
135
|
+
*/
|
|
136
|
+
patterns: string[];
|
|
137
|
+
/**
|
|
138
|
+
* determine whether to watch on start.
|
|
139
|
+
*/
|
|
140
|
+
watchOnStart: boolean;
|
|
141
|
+
};
|
|
142
|
+
static provider([cli, envs, workspace, loggerAspect, graphql, ui, devFiles, builder]: [
|
|
143
|
+
CLIMain,
|
|
144
|
+
EnvsMain,
|
|
145
|
+
Workspace,
|
|
146
|
+
LoggerMain,
|
|
147
|
+
GraphqlMain,
|
|
148
|
+
UiMain,
|
|
149
|
+
DevFilesMain,
|
|
150
|
+
BuilderMain
|
|
151
|
+
], config: TesterExtensionConfig): Promise<TesterMain>;
|
|
152
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { Logger } from '@teambit/logger';
|
|
2
|
+
import { EnvService, ExecutionContext, EnvDefinition, Env, EnvContext, ServiceTransformationMap } from '@teambit/envs';
|
|
3
|
+
import { Workspace } from '@teambit/workspace';
|
|
4
|
+
import { PubSubEngine } from 'graphql-subscriptions';
|
|
5
|
+
import { DevFilesMain } from '@teambit/dev-files';
|
|
6
|
+
import { Tester, Tests, CallbackFn } from './tester';
|
|
7
|
+
import { TesterOptions } from './tester.main.runtime';
|
|
8
|
+
export declare const OnTestsChanged = "OnTestsChanged";
|
|
9
|
+
type TesterTransformationMap = ServiceTransformationMap & {
|
|
10
|
+
getTester: () => Tester;
|
|
11
|
+
};
|
|
12
|
+
export type TesterDescriptor = {
|
|
13
|
+
/**
|
|
14
|
+
* id of the tester (e.g. jest/mocha)
|
|
15
|
+
*/
|
|
16
|
+
id: string;
|
|
17
|
+
/**
|
|
18
|
+
* display name of the tester (e.g. Jest / Mocha)
|
|
19
|
+
*/
|
|
20
|
+
displayName: string;
|
|
21
|
+
/**
|
|
22
|
+
* icon of the configured tester.
|
|
23
|
+
*/
|
|
24
|
+
icon: string;
|
|
25
|
+
/**
|
|
26
|
+
* string containing the config for display.
|
|
27
|
+
*/
|
|
28
|
+
config: string;
|
|
29
|
+
version?: string;
|
|
30
|
+
};
|
|
31
|
+
export declare class TesterService implements EnvService<Tests, TesterDescriptor> {
|
|
32
|
+
readonly workspace: Workspace;
|
|
33
|
+
private logger;
|
|
34
|
+
private pubsub;
|
|
35
|
+
private devFiles;
|
|
36
|
+
name: string;
|
|
37
|
+
constructor(workspace: Workspace, logger: Logger, pubsub: PubSubEngine, devFiles: DevFilesMain);
|
|
38
|
+
_callback: CallbackFn | undefined;
|
|
39
|
+
render(env: EnvDefinition): string;
|
|
40
|
+
getDescriptor(environment: EnvDefinition): {
|
|
41
|
+
id: string;
|
|
42
|
+
displayName: string;
|
|
43
|
+
icon: string;
|
|
44
|
+
config: string;
|
|
45
|
+
version: string;
|
|
46
|
+
} | undefined;
|
|
47
|
+
transform(env: Env, context: EnvContext): TesterTransformationMap | undefined;
|
|
48
|
+
onTestRunComplete(callback: CallbackFn): void;
|
|
49
|
+
run(context: ExecutionContext, options: TesterOptions): Promise<Tests>;
|
|
50
|
+
}
|
|
51
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { BuildContext, BuiltTaskResult, BuildTask } from '@teambit/builder';
|
|
2
|
+
import { DevFilesMain } from '@teambit/dev-files';
|
|
3
|
+
/**
|
|
4
|
+
* tester build task. Allows to test components during component build.
|
|
5
|
+
*/
|
|
6
|
+
export declare class TesterTask implements BuildTask {
|
|
7
|
+
readonly aspectId: string;
|
|
8
|
+
private devFiles;
|
|
9
|
+
readonly name = "TestComponents";
|
|
10
|
+
readonly dependencies: string[];
|
|
11
|
+
constructor(aspectId: string, devFiles: DevFilesMain);
|
|
12
|
+
execute(context: BuildContext): Promise<BuiltTaskResult>;
|
|
13
|
+
}
|
|
14
|
+
export declare function getJUnitArtifactPath(): string;
|
|
15
|
+
export declare function getArtifactDef(): {
|
|
16
|
+
name: string;
|
|
17
|
+
globPatterns: string[];
|
|
18
|
+
rootDir: string;
|
|
19
|
+
}[];
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React, { ComponentType } from 'react';
|
|
2
|
+
import { SlotRegistry } from '@teambit/harmony';
|
|
3
|
+
import { ComponentUI } from '@teambit/component';
|
|
4
|
+
import { ComponentCompareUI } from '@teambit/component-compare';
|
|
5
|
+
export type EmptyStateSlot = SlotRegistry<ComponentType>;
|
|
6
|
+
export declare class TesterUI {
|
|
7
|
+
private component;
|
|
8
|
+
private emptyStateSlot;
|
|
9
|
+
static dependencies: import("@teambit/harmony").Aspect[];
|
|
10
|
+
static runtime: import("@teambit/harmony").RuntimeDefinition;
|
|
11
|
+
stageKey?: string;
|
|
12
|
+
constructor(component: ComponentUI, emptyStateSlot: EmptyStateSlot);
|
|
13
|
+
/**
|
|
14
|
+
* register a new tester empty state. this allows to register a different empty state from each environment for example.
|
|
15
|
+
*/
|
|
16
|
+
registerEmptyState(emptyStateComponent: ComponentType): this;
|
|
17
|
+
getTesterCompare(): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
static slots: ((registerFn: () => string) => SlotRegistry<React.ComponentType>)[];
|
|
19
|
+
static provider([component, componentCompare]: [ComponentUI, ComponentCompareUI], config: any, [emptyStateSlot]: [EmptyStateSlot]): Promise<TesterUI>;
|
|
20
|
+
}
|
|
21
|
+
export default TesterUI;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Section } from '@teambit/component';
|
|
2
|
+
import { EmptyStateSlot } from './tester.ui.runtime';
|
|
3
|
+
export declare class TestsSection implements Section {
|
|
4
|
+
private emptyStateSlot;
|
|
5
|
+
constructor(emptyStateSlot: EmptyStateSlot);
|
|
6
|
+
route: {
|
|
7
|
+
path: string;
|
|
8
|
+
element: import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
};
|
|
10
|
+
navigationLink: {
|
|
11
|
+
href: string;
|
|
12
|
+
children: string;
|
|
13
|
+
};
|
|
14
|
+
order: number;
|
|
15
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Component } from '@teambit/component';
|
|
2
|
+
import { DevFilesMain } from '@teambit/dev-files';
|
|
3
|
+
/**
|
|
4
|
+
* detect test files in components
|
|
5
|
+
*/
|
|
6
|
+
export declare function detectTestFiles(component: Component, devFiles: DevFilesMain): import("@teambit/legacy/dist/consumer/component/sources").AbstractVinyl[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { detectTestFiles } from './detect-spec-files';
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teambit/tester",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.229",
|
|
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.229"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"chalk": "2.4.2",
|
|
@@ -23,17 +23,17 @@
|
|
|
23
23
|
"@teambit/tests-results": "1.0.4",
|
|
24
24
|
"@teambit/defender.ui.test-compare-section": "0.0.100",
|
|
25
25
|
"@teambit/bit-error": "0.0.404",
|
|
26
|
-
"@teambit/cli": "0.0.
|
|
27
|
-
"@teambit/logger": "0.0.
|
|
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.
|
|
26
|
+
"@teambit/cli": "0.0.862",
|
|
27
|
+
"@teambit/logger": "0.0.955",
|
|
28
|
+
"@teambit/workspace": "1.0.229",
|
|
29
|
+
"@teambit/envs": "1.0.229",
|
|
30
|
+
"@teambit/component": "1.0.229",
|
|
31
|
+
"@teambit/graphql": "1.0.229",
|
|
32
|
+
"@teambit/builder": "1.0.229",
|
|
33
|
+
"@teambit/dev-files": "1.0.229",
|
|
34
|
+
"@teambit/ui": "1.0.229",
|
|
35
|
+
"@teambit/compiler": "1.0.229",
|
|
36
|
+
"@teambit/component-compare": "1.0.229",
|
|
37
37
|
"@teambit/defender.ui.test-compare": "0.0.262",
|
|
38
38
|
"@teambit/defender.ui.test-page": "0.0.40"
|
|
39
39
|
},
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"@types/mocha": "9.1.0",
|
|
45
45
|
"chai": "4.3.0",
|
|
46
46
|
"@teambit/defender.content.tester-overview": "1.95.0",
|
|
47
|
-
"@teambit/harmony.envs.core-aspect-env": "0.0.
|
|
47
|
+
"@teambit/harmony.envs.core-aspect-env": "0.0.33"
|
|
48
48
|
},
|
|
49
49
|
"peerDependencies": {
|
|
50
50
|
"react": "^17.0.0 || ^18.0.0",
|
package/tsconfig.json
CHANGED
|
@@ -20,8 +20,7 @@
|
|
|
20
20
|
"emitDeclarationOnly": true,
|
|
21
21
|
"strict": true,
|
|
22
22
|
"strictPropertyInitialization": false,
|
|
23
|
-
"noImplicitAny": false
|
|
24
|
-
"composite": true
|
|
23
|
+
"noImplicitAny": false
|
|
25
24
|
},
|
|
26
25
|
"exclude": [
|
|
27
26
|
"artifacts",
|
|
@@ -36,40 +35,5 @@
|
|
|
36
35
|
"include": [
|
|
37
36
|
"**/*",
|
|
38
37
|
"**/*.json"
|
|
39
|
-
],
|
|
40
|
-
"references": [
|
|
41
|
-
{
|
|
42
|
-
"path": "/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.harmony_cli@0.0.860"
|
|
43
|
-
},
|
|
44
|
-
{
|
|
45
|
-
"path": "/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.harmony_logger@0.0.953"
|
|
46
|
-
},
|
|
47
|
-
{
|
|
48
|
-
"path": "/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.workspace_workspace@1.0.227"
|
|
49
|
-
},
|
|
50
|
-
{
|
|
51
|
-
"path": "/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.envs_envs@1.0.227"
|
|
52
|
-
},
|
|
53
|
-
{
|
|
54
|
-
"path": "/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.component_component@1.0.227"
|
|
55
|
-
},
|
|
56
|
-
{
|
|
57
|
-
"path": "/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.harmony_graphql@1.0.227"
|
|
58
|
-
},
|
|
59
|
-
{
|
|
60
|
-
"path": "/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.pipelines_builder@1.0.227"
|
|
61
|
-
},
|
|
62
|
-
{
|
|
63
|
-
"path": "/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.component_dev-files@1.0.227"
|
|
64
|
-
},
|
|
65
|
-
{
|
|
66
|
-
"path": "/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.ui-foundation_ui@1.0.227"
|
|
67
|
-
},
|
|
68
|
-
{
|
|
69
|
-
"path": "/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.compilation_compiler@1.0.227"
|
|
70
|
-
},
|
|
71
|
-
{
|
|
72
|
-
"path": "/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.component_component-compare@1.0.227"
|
|
73
|
-
}
|
|
74
38
|
]
|
|
75
39
|
}
|