@teambit/tester 0.0.888 → 0.0.889
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/test.cmd.d.ts +1 -0
- package/dist/test.cmd.js +1 -0
- package/dist/test.cmd.js.map +1 -1
- package/package-tar/teambit-tester-0.0.889.tgz +0 -0
- package/package.json +15 -15
- package/{preview-1667101073781.js → preview-1667274254521.js} +2 -2
- package/test.cmd.tsx +1 -0
- package/package-tar/teambit-tester-0.0.888.tgz +0 -0
package/dist/test.cmd.d.ts
CHANGED
package/dist/test.cmd.js
CHANGED
|
@@ -63,6 +63,7 @@ class TestCmd {
|
|
|
63
63
|
this.logger = logger;
|
|
64
64
|
(0, _defineProperty2().default)(this, "name", 'test [component-pattern]');
|
|
65
65
|
(0, _defineProperty2().default)(this, "description", 'test components in the workspace');
|
|
66
|
+
(0, _defineProperty2().default)(this, "helpUrl", 'reference/testing/tester-overview');
|
|
66
67
|
(0, _defineProperty2().default)(this, "arguments", [{
|
|
67
68
|
name: 'component-pattern',
|
|
68
69
|
description: _constants().COMPONENT_PATTERN_HELP
|
package/dist/test.cmd.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["TestCmd","constructor","tester","workspace","logger","name","description","COMPONENT_PATTERN_HELP","render","userPattern","watch","debug","all","env","scope","junit","coverage","timer","Timer","create","scopeName","undefined","consoleWarning","start","ConsumerNotFound","getPatternWithScope","pattern","patternWithScope","components","getComponentsByUserInput","length","code","data","console","chalk","cyan","off","tests","test","hasErrors","seconds","stop"],"sources":["test.cmd.tsx"],"sourcesContent":["import { Command, CommandOptions } from '@teambit/cli';\nimport chalk from 'chalk';\nimport { Logger } from '@teambit/logger';\nimport { Workspace } from '@teambit/workspace';\nimport { ConsumerNotFound } from '@teambit/legacy/dist/consumer/exceptions';\nimport { Timer } from '@teambit/legacy/dist/toolbox/timer';\nimport { COMPONENT_PATTERN_HELP } from '@teambit/legacy/dist/constants';\nimport { Box, Text } from 'ink';\nimport React from 'react';\nimport type { TesterMain } from './tester.main.runtime';\n\ntype TestFlags = {\n watch: boolean;\n debug: boolean;\n all: boolean;\n env?: string;\n scope?: string;\n junit?: string;\n coverage?: boolean;\n};\n\nexport class TestCmd implements Command {\n name = 'test [component-pattern]';\n description = 'test components in the workspace';\n arguments = [\n {\n name: 'component-pattern',\n description: COMPONENT_PATTERN_HELP,\n },\n ];\n alias = 'at';\n group = 'development';\n options = [\n ['w', 'watch', 'start the tester in watch mode.'],\n ['d', 'debug', 'start the tester in debug mode.'],\n ['a', 'all', 'test all components, not only new and modified'],\n ['', 'junit <filepath>', 'write tests results as JUnit XML format into the specified file path'],\n ['', 'coverage', 'show code coverage data'],\n ['e', 'env <id>', 'test only the given env'],\n [\n 's',\n 'scope <scope-name>',\n 'DEPRECATED. (use the pattern instead, e.g. \"scopeName/**\"). name of the scope to test',\n ],\n // TODO: we need to reduce this redundant casting every time.\n ] as CommandOptions;\n\n constructor(private tester: TesterMain, private workspace: Workspace, private logger: Logger) {}\n\n async render(\n [userPattern]: [string],\n { watch = false, debug = false, all = false, env, scope, junit, coverage = false }: TestFlags\n ) {\n const timer = Timer.create();\n const scopeName = typeof scope === 'string' ? scope : undefined;\n if (scopeName) {\n this.logger.consoleWarning(\n `--scope is deprecated, use the pattern argument instead. e.g. \"scopeName/**\" for the entire scope`\n );\n }\n timer.start();\n if (!this.workspace) throw new ConsumerNotFound();\n\n const getPatternWithScope = () => {\n if (!userPattern && !scope) return undefined;\n const pattern = userPattern || '**';\n return scopeName ? `${scopeName}/${pattern}` : pattern;\n };\n const patternWithScope = getPatternWithScope();\n const components = await this.workspace.getComponentsByUserInput(all, patternWithScope, true);\n if (!components.length) {\n return {\n code: 0,\n data: (\n <Box>\n <Text bold>\n no components found to test. use \"--all\" flag to test all components or specify the ids to test,\n otherwise, only new and modified components will be tested{' '}\n </Text>\n </Box>\n ),\n };\n }\n\n this.logger.console(\n `testing total of ${components.length} components in workspace '${chalk.cyan(this.workspace.name)}'`\n );\n\n let code = 0;\n if (watch && !debug) {\n // avoid turning off the logger for non-watch scenario. otherwise, when this aspect throws errors, they'll be\n // swallowed. (Jest errors are shown regardless via Jest, but if the tester is unable to run Jest in the first\n // place, these errors won't be shown)\n this.logger.off();\n await this.tester.watch(components, {\n watch,\n debug,\n env,\n coverage,\n });\n } else {\n const tests = await this.tester.test(components, {\n watch,\n debug,\n env,\n junit,\n coverage,\n });\n if (tests.hasErrors()) code = 1;\n }\n const { seconds } = timer.stop();\n\n if (watch) return <Box></Box>;\n return {\n code,\n data: (\n <Box>\n <Text>test has been completed in </Text>\n <Text color=\"cyan\">{seconds} </Text>\n <Text>seconds.</Text>\n </Box>\n ),\n };\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAGA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAaO,MAAMA,OAAO,CAAoB;
|
|
1
|
+
{"version":3,"names":["TestCmd","constructor","tester","workspace","logger","name","description","COMPONENT_PATTERN_HELP","render","userPattern","watch","debug","all","env","scope","junit","coverage","timer","Timer","create","scopeName","undefined","consoleWarning","start","ConsumerNotFound","getPatternWithScope","pattern","patternWithScope","components","getComponentsByUserInput","length","code","data","console","chalk","cyan","off","tests","test","hasErrors","seconds","stop"],"sources":["test.cmd.tsx"],"sourcesContent":["import { Command, CommandOptions } from '@teambit/cli';\nimport chalk from 'chalk';\nimport { Logger } from '@teambit/logger';\nimport { Workspace } from '@teambit/workspace';\nimport { ConsumerNotFound } from '@teambit/legacy/dist/consumer/exceptions';\nimport { Timer } from '@teambit/legacy/dist/toolbox/timer';\nimport { COMPONENT_PATTERN_HELP } from '@teambit/legacy/dist/constants';\nimport { Box, Text } from 'ink';\nimport React from 'react';\nimport type { TesterMain } from './tester.main.runtime';\n\ntype TestFlags = {\n watch: boolean;\n debug: boolean;\n all: boolean;\n env?: string;\n scope?: string;\n junit?: string;\n coverage?: boolean;\n};\n\nexport class TestCmd implements Command {\n name = 'test [component-pattern]';\n description = 'test components in the workspace';\n helpUrl = 'reference/testing/tester-overview';\n arguments = [\n {\n name: 'component-pattern',\n description: COMPONENT_PATTERN_HELP,\n },\n ];\n alias = 'at';\n group = 'development';\n options = [\n ['w', 'watch', 'start the tester in watch mode.'],\n ['d', 'debug', 'start the tester in debug mode.'],\n ['a', 'all', 'test all components, not only new and modified'],\n ['', 'junit <filepath>', 'write tests results as JUnit XML format into the specified file path'],\n ['', 'coverage', 'show code coverage data'],\n ['e', 'env <id>', 'test only the given env'],\n [\n 's',\n 'scope <scope-name>',\n 'DEPRECATED. (use the pattern instead, e.g. \"scopeName/**\"). name of the scope to test',\n ],\n // TODO: we need to reduce this redundant casting every time.\n ] as CommandOptions;\n\n constructor(private tester: TesterMain, private workspace: Workspace, private logger: Logger) {}\n\n async render(\n [userPattern]: [string],\n { watch = false, debug = false, all = false, env, scope, junit, coverage = false }: TestFlags\n ) {\n const timer = Timer.create();\n const scopeName = typeof scope === 'string' ? scope : undefined;\n if (scopeName) {\n this.logger.consoleWarning(\n `--scope is deprecated, use the pattern argument instead. e.g. \"scopeName/**\" for the entire scope`\n );\n }\n timer.start();\n if (!this.workspace) throw new ConsumerNotFound();\n\n const getPatternWithScope = () => {\n if (!userPattern && !scope) return undefined;\n const pattern = userPattern || '**';\n return scopeName ? `${scopeName}/${pattern}` : pattern;\n };\n const patternWithScope = getPatternWithScope();\n const components = await this.workspace.getComponentsByUserInput(all, patternWithScope, true);\n if (!components.length) {\n return {\n code: 0,\n data: (\n <Box>\n <Text bold>\n no components found to test. use \"--all\" flag to test all components or specify the ids to test,\n otherwise, only new and modified components will be tested{' '}\n </Text>\n </Box>\n ),\n };\n }\n\n this.logger.console(\n `testing total of ${components.length} components in workspace '${chalk.cyan(this.workspace.name)}'`\n );\n\n let code = 0;\n if (watch && !debug) {\n // avoid turning off the logger for non-watch scenario. otherwise, when this aspect throws errors, they'll be\n // swallowed. (Jest errors are shown regardless via Jest, but if the tester is unable to run Jest in the first\n // place, these errors won't be shown)\n this.logger.off();\n await this.tester.watch(components, {\n watch,\n debug,\n env,\n coverage,\n });\n } else {\n const tests = await this.tester.test(components, {\n watch,\n debug,\n env,\n junit,\n coverage,\n });\n if (tests.hasErrors()) code = 1;\n }\n const { seconds } = timer.stop();\n\n if (watch) return <Box></Box>;\n return {\n code,\n data: (\n <Box>\n <Text>test has been completed in </Text>\n <Text color=\"cyan\">{seconds} </Text>\n <Text>seconds.</Text>\n </Box>\n ),\n };\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAGA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAaO,MAAMA,OAAO,CAAoB;EA2BtCC,WAAW,CAASC,MAAkB,EAAUC,SAAoB,EAAUC,MAAc,EAAE;IAAA,KAA1EF,MAAkB,GAAlBA,MAAkB;IAAA,KAAUC,SAAoB,GAApBA,SAAoB;IAAA,KAAUC,MAAc,GAAdA,MAAc;IAAA,8CA1BrF,0BAA0B;IAAA,qDACnB,kCAAkC;IAAA,iDACtC,mCAAmC;IAAA,mDACjC,CACV;MACEC,IAAI,EAAE,mBAAmB;MACzBC,WAAW,EAAEC;IACf,CAAC,CACF;IAAA,+CACO,IAAI;IAAA,+CACJ,aAAa;IAAA,iDACX,CACR,CAAC,GAAG,EAAE,OAAO,EAAE,iCAAiC,CAAC,EACjD,CAAC,GAAG,E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"name": "@teambit/tester",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.889",
|
|
4
4
|
"homepage": "https://bit.dev/teambit/defender/tester",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"componentId": {
|
|
7
7
|
"scope": "teambit.defender",
|
|
8
8
|
"name": "tester",
|
|
9
|
-
"version": "0.0.
|
|
9
|
+
"version": "0.0.889"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"chalk": "2.4.2",
|
|
@@ -22,19 +22,19 @@
|
|
|
22
22
|
"@babel/runtime": "7.20.0",
|
|
23
23
|
"core-js": "^3.0.0",
|
|
24
24
|
"@teambit/harmony": "0.3.3",
|
|
25
|
-
"@teambit/cli": "0.0.
|
|
26
|
-
"@teambit/logger": "0.0.
|
|
27
|
-
"@teambit/workspace": "0.0.
|
|
28
|
-
"@teambit/component": "0.0.
|
|
29
|
-
"@teambit/defender.ui.test-compare": "0.0.
|
|
30
|
-
"@teambit/graphql": "0.0.
|
|
31
|
-
"@teambit/builder": "0.0.
|
|
32
|
-
"@teambit/dev-files": "0.0.
|
|
33
|
-
"@teambit/envs": "0.0.
|
|
25
|
+
"@teambit/cli": "0.0.596",
|
|
26
|
+
"@teambit/logger": "0.0.689",
|
|
27
|
+
"@teambit/workspace": "0.0.889",
|
|
28
|
+
"@teambit/component": "0.0.889",
|
|
29
|
+
"@teambit/defender.ui.test-compare": "0.0.111",
|
|
30
|
+
"@teambit/graphql": "0.0.889",
|
|
31
|
+
"@teambit/builder": "0.0.889",
|
|
32
|
+
"@teambit/dev-files": "0.0.889",
|
|
33
|
+
"@teambit/envs": "0.0.889",
|
|
34
34
|
"@teambit/tests-results": "0.0.104",
|
|
35
|
-
"@teambit/ui": "0.0.
|
|
36
|
-
"@teambit/compiler": "0.0.
|
|
37
|
-
"@teambit/component-compare": "0.0.
|
|
35
|
+
"@teambit/ui": "0.0.889",
|
|
36
|
+
"@teambit/compiler": "0.0.889",
|
|
37
|
+
"@teambit/component-compare": "0.0.137",
|
|
38
38
|
"@teambit/defender.ui.test-page": "0.0.11",
|
|
39
39
|
"@teambit/bit-error": "0.0.401"
|
|
40
40
|
},
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"@teambit/defender.content.tester-overview": "1.95.0"
|
|
52
52
|
},
|
|
53
53
|
"peerDependencies": {
|
|
54
|
-
"@teambit/legacy": "1.0.
|
|
54
|
+
"@teambit/legacy": "1.0.380",
|
|
55
55
|
"react-dom": "^16.8.0 || ^17.0.0",
|
|
56
56
|
"react": "^16.8.0 || ^17.0.0"
|
|
57
57
|
},
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.defender_tester@0.0.
|
|
2
|
-
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.defender_tester@0.0.
|
|
1
|
+
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.defender_tester@0.0.889/dist/tester.composition.js';
|
|
2
|
+
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.defender_tester@0.0.889/dist/tester.docs.mdx';
|
|
3
3
|
|
|
4
4
|
export const compositions = [compositions_0];
|
|
5
5
|
export const overview = [overview_0];
|
package/test.cmd.tsx
CHANGED
|
Binary file
|