@teambit/tester 0.0.881 → 0.0.883

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.
Files changed (40) hide show
  1. package/dist/exceptions/index.js +0 -6
  2. package/dist/exceptions/index.js.map +1 -1
  3. package/dist/exceptions/no-matching-components.js +0 -3
  4. package/dist/exceptions/no-matching-components.js.map +1 -1
  5. package/dist/exceptions/no-test-files-found.js +0 -6
  6. package/dist/exceptions/no-test-files-found.js.map +1 -1
  7. package/dist/index.js +0 -8
  8. package/dist/index.js.map +1 -1
  9. package/dist/test.cmd.js +2 -37
  10. package/dist/test.cmd.js.map +1 -1
  11. package/dist/tester.aspect.js +0 -5
  12. package/dist/tester.aspect.js.map +1 -1
  13. package/dist/tester.compare.section.js +0 -13
  14. package/dist/tester.compare.section.js.map +1 -1
  15. package/dist/tester.composition.js +0 -6
  16. package/dist/tester.composition.js.map +1 -1
  17. package/dist/tester.graphql.js +0 -17
  18. package/dist/tester.graphql.js.map +1 -1
  19. package/dist/tester.js +0 -6
  20. package/dist/tester.js.map +1 -1
  21. package/dist/tester.main.runtime.js +3 -94
  22. package/dist/tester.main.runtime.js.map +1 -1
  23. package/dist/tester.service.js +0 -50
  24. package/dist/tester.service.js.map +1 -1
  25. package/dist/tester.task.js +11 -54
  26. package/dist/tester.task.js.map +1 -1
  27. package/dist/tester.ui.runtime.js +1 -34
  28. package/dist/tester.ui.runtime.js.map +1 -1
  29. package/dist/tests.section.js +0 -13
  30. package/dist/tests.section.js.map +1 -1
  31. package/dist/utils/detect-spec-files.js +0 -4
  32. package/dist/utils/detect-spec-files.js.map +1 -1
  33. package/dist/utils/index.js +0 -3
  34. package/dist/utils/index.js.map +1 -1
  35. package/dist/utils/junit-generator.js +0 -18
  36. package/dist/utils/junit-generator.js.map +1 -1
  37. package/package-tar/teambit-tester-0.0.883.tgz +0 -0
  38. package/package.json +11 -11
  39. package/{preview-1666409808293.js → preview-1666582798766.js} +2 -2
  40. package/package-tar/teambit-tester-0.0.881.tgz +0 -0
@@ -1,67 +1,49 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
5
4
  Object.defineProperty(exports, "__esModule", {
6
5
  value: true
7
6
  });
8
7
  exports.testsResultsToJUnitFormat = testsResultsToJUnitFormat;
9
-
10
8
  function _junitReportBuilder() {
11
9
  const data = _interopRequireDefault(require("junit-report-builder"));
12
-
13
10
  _junitReportBuilder = function () {
14
11
  return data;
15
12
  };
16
-
17
13
  return data;
18
14
  }
19
-
20
15
  function _stripAnsi() {
21
16
  const data = _interopRequireDefault(require("strip-ansi"));
22
-
23
17
  _stripAnsi = function () {
24
18
  return data;
25
19
  };
26
-
27
20
  return data;
28
21
  }
29
-
30
22
  function testsResultsToJUnitFormat(components) {
31
23
  const builder = _junitReportBuilder().default.newBuilder();
32
-
33
24
  components.forEach(compResult => {
34
25
  var _compResult$results, _compResult$results3;
35
-
36
26
  const suite = builder.testSuite().name(compResult.componentId.toString());
37
-
38
27
  if ((_compResult$results = compResult.results) !== null && _compResult$results !== void 0 && _compResult$results.start) {
39
28
  var _compResult$results2;
40
-
41
29
  suite.timestamp(new Date((_compResult$results2 = compResult.results) === null || _compResult$results2 === void 0 ? void 0 : _compResult$results2.start).toISOString());
42
30
  }
43
-
44
31
  (_compResult$results3 = compResult.results) === null || _compResult$results3 === void 0 ? void 0 : _compResult$results3.testFiles.forEach(testFile => {
45
32
  if (testFile.error) {
46
33
  const testCase = suite.testCase().className(testFile.file).name(testFile.file);
47
34
  testCase.error((0, _stripAnsi().default)(testFile.error.message));
48
35
  }
49
-
50
36
  testFile.tests.forEach(test => {
51
37
  const testCase = suite.testCase().className(testFile.file).name(test.name);
52
-
53
38
  if (test.error) {
54
39
  testCase.error((0, _stripAnsi().default)(test.error));
55
40
  }
56
-
57
41
  if (test.failure) {
58
42
  testCase.failure((0, _stripAnsi().default)(test.failure));
59
43
  }
60
-
61
44
  if (test.status === 'skipped' || test.status === 'pending') {
62
45
  testCase.skipped();
63
46
  }
64
-
65
47
  if (test.duration) {
66
48
  testCase.time(test.duration / 1000);
67
49
  }
@@ -1 +1 @@
1
- {"version":3,"names":["testsResultsToJUnitFormat","components","builder","junitReportBuilder","newBuilder","forEach","compResult","suite","testSuite","name","componentId","toString","results","start","timestamp","Date","toISOString","testFiles","testFile","error","testCase","className","file","stripAnsi","message","tests","test","failure","status","skipped","duration","time","build"],"sources":["junit-generator.ts"],"sourcesContent":["import junitReportBuilder from 'junit-report-builder';\nimport stripAnsi from 'strip-ansi';\nimport { ComponentsResults } from '../tester';\n\nexport function testsResultsToJUnitFormat(components: ComponentsResults[]): string {\n const builder = junitReportBuilder.newBuilder();\n components.forEach((compResult) => {\n const suite = builder.testSuite().name(compResult.componentId.toString());\n if (compResult.results?.start) {\n suite.timestamp(new Date(compResult.results?.start).toISOString());\n }\n compResult.results?.testFiles.forEach((testFile) => {\n if (testFile.error) {\n const testCase = suite.testCase().className(testFile.file).name(testFile.file);\n testCase.error(stripAnsi(testFile.error.message as string));\n }\n testFile.tests.forEach((test) => {\n const testCase = suite.testCase().className(testFile.file).name(test.name);\n if (test.error) {\n testCase.error(stripAnsi(test.error));\n }\n if (test.failure) {\n testCase.failure(stripAnsi(test.failure));\n }\n if (test.status === 'skipped' || test.status === 'pending') {\n testCase.skipped();\n }\n if (test.duration) {\n testCase.time(test.duration / 1000);\n }\n });\n });\n });\n return builder.build();\n}\n"],"mappings":";;;;;;;;;AAAA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAGO,SAASA,yBAAT,CAAmCC,UAAnC,EAA4E;EACjF,MAAMC,OAAO,GAAGC,6BAAA,CAAmBC,UAAnB,EAAhB;;EACAH,UAAU,CAACI,OAAX,CAAoBC,UAAD,IAAgB;IAAA;;IACjC,MAAMC,KAAK,GAAGL,OAAO,CAACM,SAAR,GAAoBC,IAApB,CAAyB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AAQ,CAACW,IAAT,CAAcL,IAAI,CAACI,QAAL,GAAgB,IAA9B;QACD;MACF,CAdD;IAeD,CApBD;EAqBD,CA1BD;EA2BA,OAAO5B,OAAO,CAAC8B,KAAR,EAAP;AACD"}
1
+ {"version":3,"names":["testsResultsToJUnitFormat","components","builder","junitReportBuilder","newBuilder","forEach","compResult","suite","testSuite","name","componentId","toString","results","start","timestamp","Date","toISOString","testFiles","testFile","error","testCase","className","file","stripAnsi","message","tests","test","failure","status","skipped","duration","time","build"],"sources":["junit-generator.ts"],"sourcesContent":["import junitReportBuilder from 'junit-report-builder';\nimport stripAnsi from 'strip-ansi';\nimport { ComponentsResults } from '../tester';\n\nexport function testsResultsToJUnitFormat(components: ComponentsResults[]): string {\n const builder = junitReportBuilder.newBuilder();\n components.forEach((compResult) => {\n const suite = builder.testSuite().name(compResult.componentId.toString());\n if (compResult.results?.start) {\n suite.timestamp(new Date(compResult.results?.start).toISOString());\n }\n compResult.results?.testFiles.forEach((testFile) => {\n if (testFile.error) {\n const testCase = suite.testCase().className(testFile.file).name(testFile.file);\n testCase.error(stripAnsi(testFile.error.message as string));\n }\n testFile.tests.forEach((test) => {\n const testCase = suite.testCase().className(testFile.file).name(test.name);\n if (test.error) {\n testCase.error(stripAnsi(test.error));\n }\n if (test.failure) {\n testCase.failure(stripAnsi(test.failure));\n }\n if (test.status === 'skipped' || test.status === 'pending') {\n testCase.skipped();\n }\n if (test.duration) {\n testCase.time(test.duration / 1000);\n }\n });\n });\n });\n return builder.build();\n}\n"],"mappings":";;;;;;;AAAA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAGO,SAASA,yBAAyB,CAACC,UAA+B,EAAU;EACjF,MAAMC,OAAO,GAAGC,6BAAkB,CAACC,UAAU,EAAE;EAC/CH,UAAU,CAACI,OAAO,CAAEC,UAAU,IAAK;IAAA;IACjC,MAAMC,KAAK,GAAGL,OAAO,CAACM,SAAS,EA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I,CAACI,QAAQ,EAAE;UACjBV,QAAQ,CAACW,IAAI,CAACL,IAAI,CAACI,QAAQ,GAAG,IAAI,CAAC;QACrC;MACF,CAAC,CAAC;IACJ,CAAC,CAAC;EACJ,CAAC,CAAC;EACF,OAAO5B,OAAO,CAAC8B,KAAK,EAAE;AACxB"}
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@teambit/tester",
3
- "version": "0.0.881",
3
+ "version": "0.0.883",
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.881"
9
+ "version": "0.0.883"
10
10
  },
11
11
  "dependencies": {
12
12
  "chalk": "2.4.2",
@@ -24,17 +24,17 @@
24
24
  "@teambit/harmony": "0.3.3",
25
25
  "@teambit/cli": "0.0.591",
26
26
  "@teambit/logger": "0.0.684",
27
- "@teambit/workspace": "0.0.881",
28
- "@teambit/component": "0.0.881",
27
+ "@teambit/workspace": "0.0.883",
28
+ "@teambit/component": "0.0.883",
29
29
  "@teambit/defender.ui.test-compare": "0.0.105",
30
- "@teambit/graphql": "0.0.881",
31
- "@teambit/builder": "0.0.881",
32
- "@teambit/dev-files": "0.0.881",
33
- "@teambit/envs": "0.0.881",
30
+ "@teambit/graphql": "0.0.883",
31
+ "@teambit/builder": "0.0.883",
32
+ "@teambit/dev-files": "0.0.883",
33
+ "@teambit/envs": "0.0.883",
34
34
  "@teambit/tests-results": "0.0.103",
35
- "@teambit/ui": "0.0.881",
36
- "@teambit/compiler": "0.0.881",
37
- "@teambit/component-compare": "0.0.129",
35
+ "@teambit/ui": "0.0.883",
36
+ "@teambit/compiler": "0.0.883",
37
+ "@teambit/component-compare": "0.0.131",
38
38
  "@teambit/defender.ui.test-page": "0.0.10",
39
39
  "@teambit/bit-error": "0.0.400"
40
40
  },
@@ -1,5 +1,5 @@
1
- import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.defender_tester@0.0.881/dist/tester.composition.js';
2
- import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.defender_tester@0.0.881/dist/tester.docs.mdx';
1
+ import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.defender_tester@0.0.883/dist/tester.composition.js';
2
+ import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.defender_tester@0.0.883/dist/tester.docs.mdx';
3
3
 
4
4
  export const compositions = [compositions_0];
5
5
  export const overview = [overview_0];