@teambit/multi-tester 1.0.424 → 1.0.426

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.
@@ -1,4 +1,4 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
2
  <testsuites tests="0" failures="0" errors="0" skipped="0">
3
- <testsuite name="teambit.defender/multi-tester@1.0.424" tests="0" failures="0" errors="0" skipped="0"/>
3
+ <testsuite name="teambit.defender/multi-tester@1.0.426" tests="0" failures="0" errors="0" skipped="0"/>
4
4
  </testsuites>
@@ -1 +1 @@
1
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["teambit.defender/multi-tester-preview"]=t():e["teambit.defender/multi-tester-preview"]=t()}(self,(()=>(()=>{"use strict";var e={98875:(e,t,n)=>{Object.defineProperty(t,"Ay",{enumerable:!0,get:function(){return r.default}});var r=o(n(62251));function o(e){return e&&e.__esModule?e:{default:e}}o.__bit_component={id:"teambit.defender/content/tester-overview@1.95.0",homepage:"https://bit.dev/teambit/defender/content/tester-overview",exported:!0}},62251:(e,t,n)=>{var r={id:"teambit.defender/content/tester-overview@1.95.0",homepage:"https://bit.dev/teambit/defender/content/tester-overview",exported:!0};Object.defineProperty(t,"__esModule",{value:!0}),t.default=c,s(n(41594));var o=n(5016),i=n(65682),a=["components"];function s(e){return e&&e.__esModule?e:{default:e}}function p(){return p=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},p.apply(this,arguments)}function d(e,t){if(null==e)return{};var n,r,o=l(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function l(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}s.__bit_component=r,p.__bit_component=r,d.__bit_component=r,l.__bit_component=r;var m={},u="wrapper";function c(e){var t=e.components,n=d(e,a);return(0,o.mdx)(u,p({},m,n,{components:t,mdxType:"MDXLayout"}),(0,o.mdx)(i.MDXScopeProvider,{components:{},mdxType:"MDXScopeProvider"},(0,o.mdx)("h1",null,"Tester Overview"),(0,o.mdx)("p",null,"The ",(0,o.mdx)("em",{parentName:"p"},"Tester")," provides a unified interface for testing components regardless of the specific tester they use."),(0,o.mdx)("p",null,"Software testing is a way to validate that an application or a module of it, behaves as expected."),(0,o.mdx)("p",null,"Web applications and services are often tested using a set of testing tools, where each tool plays a different role. For example, ",(0,o.mdx)("a",{parentName:"p",href:"https://jestjs.io/"},"Jest")," can be used as a test runner and as an assertion library, while ",(0,o.mdx)("a",{parentName:"p",href:"https://testing-library.com/"},"React Testing Library")," can be used for testing utilities."),(0,o.mdx)("p",null,"The Tester aspect is responsible for standardizing test execution for components; That is, it standardizes the way test runners are used. Other testing libraries used for utils, mocks, etc., are irrelevant, in that sense."),(0,o.mdx)("p",null,"Standardization is done for component testing during development (in the workspace) as well as for distribution (in a capsule ",", as part of the component ",(0,o.mdx)("a",{parentName:"p",href:"/builder/build-pipelines"},"build pipeline"),")."),(0,o.mdx)("h2",null,"Testing in development"),(0,o.mdx)("p",null,"Bit tests all components in the ",(0,o.mdx)("a",{parentName:"p",href:"/workspace/overview"},"Workspace")," using just a single command. That is true for components of all types, regardless of their specific ",(0,o.mdx)("a",{parentName:"p",href:"/envs/overview"},"Env"),", and as a consequence of that, their specific ",(0,o.mdx)("a",{parentName:"p",href:"/tester/overview"},"Tester implementation")," and configuration."),(0,o.mdx)("pre",null,(0,o.mdx)("code",{parentName:"pre",className:"language-bash"},"bit test\n")),(0,o.mdx)("p",null,"Components can be watched for changes and retested with a single command, as well."),(0,o.mdx)("pre",null,(0,o.mdx)("code",{parentName:"pre",className:"language-bash"},"bit test -w\n")),(0,o.mdx)("p",null,"To learn more on testing during development, please refer to ",(0,o.mdx)("a",{parentName:"p",href:"/tester/workspace-testing"},"Workspace Testing"),"."),(0,o.mdx)("h2",null,"Testing during build"),(0,o.mdx)("p",null,"Testing components for distribution is done during ",(0,o.mdx)("inlineCode",{parentName:"p"},"build")," by the Bit ",(0,o.mdx)("a",{parentName:"p",href:"/builder/overview"},"Builder"),"."),(0,o.mdx)("p",null,"Component build can be simulated with ",(0,o.mdx)("inlineCode",{parentName:"p"},"bit build")," and done through ",(0,o.mdx)("a",{parentName:"p",href:"/components/tags"},"Tag")," or ",(0,o.mdx)("a",{parentName:"p",href:"/components/snaps"},"Snap")),(0,o.mdx)("pre",null,(0,o.mdx)("code",{parentName:"pre",className:"language-bash"},"bit build\n")),(0,o.mdx)("p",null,"By default, Bit's pre-configured Envs includes a ",(0,o.mdx)("a",{parentName:"p",href:"/builder/overview#build-task"},"Build Task")," for testing components in the ",(0,o.mdx)("a",{parentName:"p",href:"/builder/build-pipelines"},"Build Pipeline"),", each using the Env's specific test configs."),(0,o.mdx)("p",null,"Testing during build provides the highest \"external validity\" by running tests on the distributable code that was generated by the Env's compiler and not by the tester's.\nThat way, the exact same code that will be consumed by other components, is tested before it is released. Moreover, since each component is tested in a capsule ",", isolated from the rest of the workspace, tests are guaranteed to provide results that are context-agnostic and free of false-positives."),(0,o.mdx)("h2",null,"Configuring and implementing Testers"),(0,o.mdx)("p",null,"Testers are configured in the ",(0,o.mdx)("a",{parentName:"p",href:"/envs/overview"},"Env")," which is configured on your ",(0,o.mdx)("a",{parentName:"p",href:"/components/overview"},"Component"),". Customizing the Tester can be done by ",(0,o.mdx)("a",{parentName:"p",href:"/envs/services/testing"},"customizing an existing env with your tester")," or by ",(0,o.mdx)("a",{parentName:"p",href:"/envs/customizing-env"},"implementing your own Env"),"."),(0,o.mdx)("p",null,"Tester can also be implemented into Bit through few interfaces. \x3c!--TODO For more information on implementing your own compiler please refer to ",(0,o.mdx)("a",{parentName:"p",href:"/"},"Implement a Compiler"),".")))}c.__bit_component=r,c.isMDXComponent=!0},11520:(e,t,n)=>{var r={id:"teambit.defender/multi-tester@1.0.424",homepage:"https://bit.cloud/teambit/defender/multi-tester",exported:!0};function o(){const e=i(n(41594));return o=function(){return e},e}function i(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.Logo=void 0,o.__bit_component=r,i.__bit_component=r;const a=()=>o().default.createElement("div",{style:{height:"100%",display:"flex",justifyContent:"center"}},o().default.createElement("img",{style:{width:70},src:"https://static.bit.dev/extensions-icons/tester.svg"}));a.__bit_component=r,t.Logo=a},5016:e=>{e.exports=MdxJsReact},41594:e=>{e.exports=React},65682:e=>{e.exports=TeambitMdxUiMdxScopeContext}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r](i,i.exports,n),i.exports}n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};n.r(r),n.d(r,{compositions:()=>f,compositions_metadata:()=>v,overview:()=>b});var o={};n.r(o),n.d(o,{default:()=>c});var i=n(11520),a=(n(41594),n(5016)),s=n(65682),p=n(98875),d=["components"];function l(){return l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},l.apply(null,arguments)}var m={},u="wrapper";function c(e){var t=e.components,n=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,d);return(0,a.mdx)(u,l({},m,n,{components:t,mdxType:"MDXLayout"}),(0,a.mdx)(s.MDXScopeProvider,{components:{TesterOverview:p.Ay},mdxType:"MDXScopeProvider"},(0,a.mdx)(p.Ay,{mdxType:"TesterOverview"})))}c.isMDXComponent=!0;const f=[i],b=[o],v={compositions:[{displayName:"Logo",identifier:"Logo"}]};return r})()));
1
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["teambit.defender/multi-tester-preview"]=t():e["teambit.defender/multi-tester-preview"]=t()}(self,(()=>(()=>{"use strict";var e={875:(e,t,n)=>{Object.defineProperty(t,"Ay",{enumerable:!0,get:function(){return r.default}});var r=o(n(251));function o(e){return e&&e.__esModule?e:{default:e}}o.__bit_component={id:"teambit.defender/content/tester-overview@1.95.0",homepage:"https://bit.dev/teambit/defender/content/tester-overview",exported:!0}},251:(e,t,n)=>{var r={id:"teambit.defender/content/tester-overview@1.95.0",homepage:"https://bit.dev/teambit/defender/content/tester-overview",exported:!0};Object.defineProperty(t,"__esModule",{value:!0}),t.default=c,s(n(594));var o=n(16),i=n(682),a=["components"];function s(e){return e&&e.__esModule?e:{default:e}}function p(){return p=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},p.apply(this,arguments)}function d(e,t){if(null==e)return{};var n,r,o=l(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function l(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}s.__bit_component=r,p.__bit_component=r,d.__bit_component=r,l.__bit_component=r;var m={},u="wrapper";function c(e){var t=e.components,n=d(e,a);return(0,o.mdx)(u,p({},m,n,{components:t,mdxType:"MDXLayout"}),(0,o.mdx)(i.MDXScopeProvider,{components:{},mdxType:"MDXScopeProvider"},(0,o.mdx)("h1",null,"Tester Overview"),(0,o.mdx)("p",null,"The ",(0,o.mdx)("em",{parentName:"p"},"Tester")," provides a unified interface for testing components regardless of the specific tester they use."),(0,o.mdx)("p",null,"Software testing is a way to validate that an application or a module of it, behaves as expected."),(0,o.mdx)("p",null,"Web applications and services are often tested using a set of testing tools, where each tool plays a different role. For example, ",(0,o.mdx)("a",{parentName:"p",href:"https://jestjs.io/"},"Jest")," can be used as a test runner and as an assertion library, while ",(0,o.mdx)("a",{parentName:"p",href:"https://testing-library.com/"},"React Testing Library")," can be used for testing utilities."),(0,o.mdx)("p",null,"The Tester aspect is responsible for standardizing test execution for components; That is, it standardizes the way test runners are used. Other testing libraries used for utils, mocks, etc., are irrelevant, in that sense."),(0,o.mdx)("p",null,"Standardization is done for component testing during development (in the workspace) as well as for distribution (in a capsule ",", as part of the component ",(0,o.mdx)("a",{parentName:"p",href:"/builder/build-pipelines"},"build pipeline"),")."),(0,o.mdx)("h2",null,"Testing in development"),(0,o.mdx)("p",null,"Bit tests all components in the ",(0,o.mdx)("a",{parentName:"p",href:"/workspace/overview"},"Workspace")," using just a single command. That is true for components of all types, regardless of their specific ",(0,o.mdx)("a",{parentName:"p",href:"/envs/overview"},"Env"),", and as a consequence of that, their specific ",(0,o.mdx)("a",{parentName:"p",href:"/tester/overview"},"Tester implementation")," and configuration."),(0,o.mdx)("pre",null,(0,o.mdx)("code",{parentName:"pre",className:"language-bash"},"bit test\n")),(0,o.mdx)("p",null,"Components can be watched for changes and retested with a single command, as well."),(0,o.mdx)("pre",null,(0,o.mdx)("code",{parentName:"pre",className:"language-bash"},"bit test -w\n")),(0,o.mdx)("p",null,"To learn more on testing during development, please refer to ",(0,o.mdx)("a",{parentName:"p",href:"/tester/workspace-testing"},"Workspace Testing"),"."),(0,o.mdx)("h2",null,"Testing during build"),(0,o.mdx)("p",null,"Testing components for distribution is done during ",(0,o.mdx)("inlineCode",{parentName:"p"},"build")," by the Bit ",(0,o.mdx)("a",{parentName:"p",href:"/builder/overview"},"Builder"),"."),(0,o.mdx)("p",null,"Component build can be simulated with ",(0,o.mdx)("inlineCode",{parentName:"p"},"bit build")," and done through ",(0,o.mdx)("a",{parentName:"p",href:"/components/tags"},"Tag")," or ",(0,o.mdx)("a",{parentName:"p",href:"/components/snaps"},"Snap")),(0,o.mdx)("pre",null,(0,o.mdx)("code",{parentName:"pre",className:"language-bash"},"bit build\n")),(0,o.mdx)("p",null,"By default, Bit's pre-configured Envs includes a ",(0,o.mdx)("a",{parentName:"p",href:"/builder/overview#build-task"},"Build Task")," for testing components in the ",(0,o.mdx)("a",{parentName:"p",href:"/builder/build-pipelines"},"Build Pipeline"),", each using the Env's specific test configs."),(0,o.mdx)("p",null,"Testing during build provides the highest \"external validity\" by running tests on the distributable code that was generated by the Env's compiler and not by the tester's.\nThat way, the exact same code that will be consumed by other components, is tested before it is released. Moreover, since each component is tested in a capsule ",", isolated from the rest of the workspace, tests are guaranteed to provide results that are context-agnostic and free of false-positives."),(0,o.mdx)("h2",null,"Configuring and implementing Testers"),(0,o.mdx)("p",null,"Testers are configured in the ",(0,o.mdx)("a",{parentName:"p",href:"/envs/overview"},"Env")," which is configured on your ",(0,o.mdx)("a",{parentName:"p",href:"/components/overview"},"Component"),". Customizing the Tester can be done by ",(0,o.mdx)("a",{parentName:"p",href:"/envs/services/testing"},"customizing an existing env with your tester")," or by ",(0,o.mdx)("a",{parentName:"p",href:"/envs/customizing-env"},"implementing your own Env"),"."),(0,o.mdx)("p",null,"Tester can also be implemented into Bit through few interfaces. \x3c!--TODO For more information on implementing your own compiler please refer to ",(0,o.mdx)("a",{parentName:"p",href:"/"},"Implement a Compiler"),".")))}c.__bit_component=r,c.isMDXComponent=!0},390:(e,t,n)=>{var r={id:"teambit.defender/multi-tester@1.0.426",homepage:"https://bit.cloud/teambit/defender/multi-tester",exported:!0};function o(){const e=i(n(594));return o=function(){return e},e}function i(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.Logo=void 0,o.__bit_component=r,i.__bit_component=r;const a=()=>o().default.createElement("div",{style:{height:"100%",display:"flex",justifyContent:"center"}},o().default.createElement("img",{style:{width:70},src:"https://static.bit.dev/extensions-icons/tester.svg"}));a.__bit_component=r,t.Logo=a},16:e=>{e.exports=MdxJsReact},594:e=>{e.exports=React},682:e=>{e.exports=TeambitMdxUiMdxScopeContext}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r](i,i.exports,n),i.exports}n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};n.r(r),n.d(r,{compositions:()=>f,compositions_metadata:()=>v,overview:()=>b});var o={};n.r(o),n.d(o,{default:()=>c});var i=n(390),a=(n(594),n(16)),s=n(682),p=n(875),d=["components"];function l(){return l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},l.apply(null,arguments)}var m={},u="wrapper";function c(e){var t=e.components,n=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,d);return(0,a.mdx)(u,l({},m,n,{components:t,mdxType:"MDXLayout"}),(0,a.mdx)(s.MDXScopeProvider,{components:{TesterOverview:p.Ay},mdxType:"MDXScopeProvider"},(0,a.mdx)(p.Ay,{mdxType:"TesterOverview"})))}c.isMDXComponent=!0;const f=[i],b=[o],v={compositions:[{displayName:"Logo",identifier:"Logo"}]};return r})()));
@@ -361,16 +361,16 @@
361
361
  "__schema": "ParameterSchema",
362
362
  "location": {
363
363
  "filePath": "multi-tester.tester.ts",
364
- "line": 13,
365
- "character": 15
364
+ "line": 14,
365
+ "character": 5
366
366
  },
367
367
  "name": "id",
368
368
  "type": {
369
369
  "__schema": "KeywordTypeSchema",
370
370
  "location": {
371
371
  "filePath": "multi-tester.tester.ts",
372
- "line": 13,
373
- "character": 28
372
+ "line": 14,
373
+ "character": 18
374
374
  },
375
375
  "name": "string"
376
376
  },
@@ -381,23 +381,23 @@
381
381
  "__schema": "ParameterSchema",
382
382
  "location": {
383
383
  "filePath": "multi-tester.tester.ts",
384
- "line": 13,
385
- "character": 36
384
+ "line": 15,
385
+ "character": 5
386
386
  },
387
387
  "name": "testers",
388
388
  "type": {
389
389
  "__schema": "TypeArraySchema",
390
390
  "location": {
391
391
  "filePath": "multi-tester.tester.ts",
392
- "line": 13,
393
- "character": 54
392
+ "line": 15,
393
+ "character": 23
394
394
  },
395
395
  "type": {
396
396
  "__schema": "TypeRefSchema",
397
397
  "location": {
398
398
  "filePath": "multi-tester.tester.ts",
399
- "line": 13,
400
- "character": 54
399
+ "line": 15,
400
+ "character": 23
401
401
  },
402
402
  "name": "Tester",
403
403
  "componentId": {
@@ -425,7 +425,7 @@
425
425
  "__schema": "FunctionLikeSchema",
426
426
  "location": {
427
427
  "filePath": "multi-tester.tester.ts",
428
- "line": 15,
428
+ "line": 18,
429
429
  "character": 3
430
430
  },
431
431
  "signature": "(method) MultiTester.displayConfig(): string",
@@ -435,7 +435,7 @@
435
435
  "__schema": "InferenceTypeSchema",
436
436
  "location": {
437
437
  "filePath": "multi-tester.tester.ts",
438
- "line": 15,
438
+ "line": 18,
439
439
  "character": 3
440
440
  },
441
441
  "type": "string"
@@ -446,7 +446,7 @@
446
446
  "__schema": "FunctionLikeSchema",
447
447
  "location": {
448
448
  "filePath": "multi-tester.tester.ts",
449
- "line": 23,
449
+ "line": 26,
450
450
  "character": 3
451
451
  },
452
452
  "signature": "(method) MultiTester.test(context: TesterContext): Promise<Tests>",
@@ -456,7 +456,7 @@
456
456
  "__schema": "ParameterSchema",
457
457
  "location": {
458
458
  "filePath": "multi-tester.tester.ts",
459
- "line": 23,
459
+ "line": 26,
460
460
  "character": 14
461
461
  },
462
462
  "name": "context",
@@ -464,7 +464,7 @@
464
464
  "__schema": "TypeRefSchema",
465
465
  "location": {
466
466
  "filePath": "multi-tester.tester.ts",
467
- "line": 23,
467
+ "line": 26,
468
468
  "character": 23
469
469
  },
470
470
  "name": "TesterContext",
@@ -481,7 +481,7 @@
481
481
  "__schema": "TypeRefSchema",
482
482
  "location": {
483
483
  "filePath": "multi-tester.tester.ts",
484
- "line": 23,
484
+ "line": 26,
485
485
  "character": 39
486
486
  },
487
487
  "name": "Promise",
@@ -490,7 +490,7 @@
490
490
  "__schema": "TypeRefSchema",
491
491
  "location": {
492
492
  "filePath": "multi-tester.tester.ts",
493
- "line": 23,
493
+ "line": 26,
494
494
  "character": 47
495
495
  },
496
496
  "name": "Tests",
@@ -509,7 +509,7 @@
509
509
  "__schema": "FunctionLikeSchema",
510
510
  "location": {
511
511
  "filePath": "multi-tester.tester.ts",
512
- "line": 32,
512
+ "line": 35,
513
513
  "character": 3
514
514
  },
515
515
  "signature": "(method) MultiTester.watch(context: TesterContext): Promise<Tests>",
@@ -519,7 +519,7 @@
519
519
  "__schema": "ParameterSchema",
520
520
  "location": {
521
521
  "filePath": "multi-tester.tester.ts",
522
- "line": 32,
522
+ "line": 35,
523
523
  "character": 15
524
524
  },
525
525
  "name": "context",
@@ -527,7 +527,7 @@
527
527
  "__schema": "TypeRefSchema",
528
528
  "location": {
529
529
  "filePath": "multi-tester.tester.ts",
530
- "line": 32,
530
+ "line": 35,
531
531
  "character": 24
532
532
  },
533
533
  "name": "TesterContext",
@@ -544,7 +544,7 @@
544
544
  "__schema": "TypeRefSchema",
545
545
  "location": {
546
546
  "filePath": "multi-tester.tester.ts",
547
- "line": 32,
547
+ "line": 35,
548
548
  "character": 40
549
549
  },
550
550
  "name": "Promise",
@@ -553,7 +553,7 @@
553
553
  "__schema": "TypeRefSchema",
554
554
  "location": {
555
555
  "filePath": "multi-tester.tester.ts",
556
- "line": 32,
556
+ "line": 35,
557
557
  "character": 48
558
558
  },
559
559
  "name": "Tests",
@@ -572,14 +572,14 @@
572
572
  "__schema": "FunctionLikeSchema",
573
573
  "location": {
574
574
  "filePath": "multi-tester.tester.ts",
575
- "line": 43,
575
+ "line": 46,
576
576
  "character": 3
577
577
  },
578
578
  "doc": {
579
579
  "__schema": "DocSchema",
580
580
  "location": {
581
581
  "filePath": "multi-tester.tester.ts",
582
- "line": 40,
582
+ "line": 43,
583
583
  "character": 3
584
584
  },
585
585
  "raw": "/**\n * returns the version of all testers instance (e.g. '4.0.1').\n */",
@@ -593,7 +593,7 @@
593
593
  "__schema": "KeywordTypeSchema",
594
594
  "location": {
595
595
  "filePath": "multi-tester.tester.ts",
596
- "line": 43,
596
+ "line": 46,
597
597
  "character": 14
598
598
  },
599
599
  "name": "string"
@@ -624,7 +624,7 @@
624
624
  "_legacy": {
625
625
  "scope": "teambit.defender",
626
626
  "name": "multi-tester",
627
- "version": "1.0.424"
627
+ "version": "1.0.426"
628
628
  },
629
629
  "_scope": "teambit.defender"
630
630
  }
@@ -1047,16 +1047,16 @@
1047
1047
  "__schema": "ParameterSchema",
1048
1048
  "location": {
1049
1049
  "filePath": "multi-tester.tester.ts",
1050
- "line": 13,
1051
- "character": 15
1050
+ "line": 14,
1051
+ "character": 5
1052
1052
  },
1053
1053
  "name": "id",
1054
1054
  "type": {
1055
1055
  "__schema": "KeywordTypeSchema",
1056
1056
  "location": {
1057
1057
  "filePath": "multi-tester.tester.ts",
1058
- "line": 13,
1059
- "character": 28
1058
+ "line": 14,
1059
+ "character": 18
1060
1060
  },
1061
1061
  "name": "string"
1062
1062
  },
@@ -1067,23 +1067,23 @@
1067
1067
  "__schema": "ParameterSchema",
1068
1068
  "location": {
1069
1069
  "filePath": "multi-tester.tester.ts",
1070
- "line": 13,
1071
- "character": 36
1070
+ "line": 15,
1071
+ "character": 5
1072
1072
  },
1073
1073
  "name": "testers",
1074
1074
  "type": {
1075
1075
  "__schema": "TypeArraySchema",
1076
1076
  "location": {
1077
1077
  "filePath": "multi-tester.tester.ts",
1078
- "line": 13,
1079
- "character": 54
1078
+ "line": 15,
1079
+ "character": 23
1080
1080
  },
1081
1081
  "type": {
1082
1082
  "__schema": "TypeRefSchema",
1083
1083
  "location": {
1084
1084
  "filePath": "multi-tester.tester.ts",
1085
- "line": 13,
1086
- "character": 54
1085
+ "line": 15,
1086
+ "character": 23
1087
1087
  },
1088
1088
  "name": "Tester",
1089
1089
  "componentId": {
@@ -1111,7 +1111,7 @@
1111
1111
  "__schema": "FunctionLikeSchema",
1112
1112
  "location": {
1113
1113
  "filePath": "multi-tester.tester.ts",
1114
- "line": 15,
1114
+ "line": 18,
1115
1115
  "character": 3
1116
1116
  },
1117
1117
  "signature": "(method) MultiTester.displayConfig(): string",
@@ -1121,7 +1121,7 @@
1121
1121
  "__schema": "InferenceTypeSchema",
1122
1122
  "location": {
1123
1123
  "filePath": "multi-tester.tester.ts",
1124
- "line": 15,
1124
+ "line": 18,
1125
1125
  "character": 3
1126
1126
  },
1127
1127
  "type": "string"
@@ -1132,7 +1132,7 @@
1132
1132
  "__schema": "FunctionLikeSchema",
1133
1133
  "location": {
1134
1134
  "filePath": "multi-tester.tester.ts",
1135
- "line": 23,
1135
+ "line": 26,
1136
1136
  "character": 3
1137
1137
  },
1138
1138
  "signature": "(method) MultiTester.test(context: TesterContext): Promise<Tests>",
@@ -1142,7 +1142,7 @@
1142
1142
  "__schema": "ParameterSchema",
1143
1143
  "location": {
1144
1144
  "filePath": "multi-tester.tester.ts",
1145
- "line": 23,
1145
+ "line": 26,
1146
1146
  "character": 14
1147
1147
  },
1148
1148
  "name": "context",
@@ -1150,7 +1150,7 @@
1150
1150
  "__schema": "TypeRefSchema",
1151
1151
  "location": {
1152
1152
  "filePath": "multi-tester.tester.ts",
1153
- "line": 23,
1153
+ "line": 26,
1154
1154
  "character": 23
1155
1155
  },
1156
1156
  "name": "TesterContext",
@@ -1167,7 +1167,7 @@
1167
1167
  "__schema": "TypeRefSchema",
1168
1168
  "location": {
1169
1169
  "filePath": "multi-tester.tester.ts",
1170
- "line": 23,
1170
+ "line": 26,
1171
1171
  "character": 39
1172
1172
  },
1173
1173
  "name": "Promise",
@@ -1176,7 +1176,7 @@
1176
1176
  "__schema": "TypeRefSchema",
1177
1177
  "location": {
1178
1178
  "filePath": "multi-tester.tester.ts",
1179
- "line": 23,
1179
+ "line": 26,
1180
1180
  "character": 47
1181
1181
  },
1182
1182
  "name": "Tests",
@@ -1195,7 +1195,7 @@
1195
1195
  "__schema": "FunctionLikeSchema",
1196
1196
  "location": {
1197
1197
  "filePath": "multi-tester.tester.ts",
1198
- "line": 32,
1198
+ "line": 35,
1199
1199
  "character": 3
1200
1200
  },
1201
1201
  "signature": "(method) MultiTester.watch(context: TesterContext): Promise<Tests>",
@@ -1205,7 +1205,7 @@
1205
1205
  "__schema": "ParameterSchema",
1206
1206
  "location": {
1207
1207
  "filePath": "multi-tester.tester.ts",
1208
- "line": 32,
1208
+ "line": 35,
1209
1209
  "character": 15
1210
1210
  },
1211
1211
  "name": "context",
@@ -1213,7 +1213,7 @@
1213
1213
  "__schema": "TypeRefSchema",
1214
1214
  "location": {
1215
1215
  "filePath": "multi-tester.tester.ts",
1216
- "line": 32,
1216
+ "line": 35,
1217
1217
  "character": 24
1218
1218
  },
1219
1219
  "name": "TesterContext",
@@ -1230,7 +1230,7 @@
1230
1230
  "__schema": "TypeRefSchema",
1231
1231
  "location": {
1232
1232
  "filePath": "multi-tester.tester.ts",
1233
- "line": 32,
1233
+ "line": 35,
1234
1234
  "character": 40
1235
1235
  },
1236
1236
  "name": "Promise",
@@ -1239,7 +1239,7 @@
1239
1239
  "__schema": "TypeRefSchema",
1240
1240
  "location": {
1241
1241
  "filePath": "multi-tester.tester.ts",
1242
- "line": 32,
1242
+ "line": 35,
1243
1243
  "character": 48
1244
1244
  },
1245
1245
  "name": "Tests",
@@ -1258,14 +1258,14 @@
1258
1258
  "__schema": "FunctionLikeSchema",
1259
1259
  "location": {
1260
1260
  "filePath": "multi-tester.tester.ts",
1261
- "line": 43,
1261
+ "line": 46,
1262
1262
  "character": 3
1263
1263
  },
1264
1264
  "doc": {
1265
1265
  "__schema": "DocSchema",
1266
1266
  "location": {
1267
1267
  "filePath": "multi-tester.tester.ts",
1268
- "line": 40,
1268
+ "line": 43,
1269
1269
  "character": 3
1270
1270
  },
1271
1271
  "raw": "/**\n * returns the version of all testers instance (e.g. '4.0.1').\n */",
@@ -1279,7 +1279,7 @@
1279
1279
  "__schema": "KeywordTypeSchema",
1280
1280
  "location": {
1281
1281
  "filePath": "multi-tester.tester.ts",
1282
- "line": 43,
1282
+ "line": 46,
1283
1283
  "character": 14
1284
1284
  },
1285
1285
  "name": "string"
@@ -1310,7 +1310,7 @@
1310
1310
  "_legacy": {
1311
1311
  "scope": "teambit.defender",
1312
1312
  "name": "multi-tester",
1313
- "version": "1.0.424"
1313
+ "version": "1.0.426"
1314
1314
  },
1315
1315
  "_scope": "teambit.defender"
1316
1316
  }
@@ -1325,7 +1325,7 @@
1325
1325
  "componentId": {
1326
1326
  "scope": "teambit.defender",
1327
1327
  "name": "multi-tester",
1328
- "version": "1.0.424"
1328
+ "version": "1.0.426"
1329
1329
  },
1330
1330
  "taggedModuleExports": []
1331
1331
  }
@@ -1 +1 @@
1
- {"version":3,"names":["_pMapSeries","data","_interopRequireDefault","require","_tester","_testsResults","_lodash","e","__esModule","default","_defineProperty","r","t","_toPropertyKey","Object","defineProperty","value","enumerable","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","MultiTester","constructor","id","testers","displayConfig","map","tester","displayName","join","test","context","allResults","pMapSeries","merged","mergeTests","watch","version","tests","componentResultsMap","Map","compact","forEach","currentTests","components","currentComponentResults","currIdStr","componentId","toString","foundComponent","get","set","mergeComponentResults","Tests","Array","from","values","results1","results2","start","results","mergedTestsResults","TestsResult","testFiles","success","errors","loading","exports"],"sources":["multi-tester.tester.ts"],"sourcesContent":["import pMapSeries from 'p-map-series';\nimport { Tester, TesterContext, Tests, ComponentsResults } from '@teambit/tester';\nimport { TestsResult } from '@teambit/tests-results';\nimport { compact } from 'lodash';\n\nexport type MultiCompilerOptions = {\n targetExtension?: string;\n};\n\nexport class MultiTester implements Tester {\n displayName = 'Multi tester';\n\n constructor(readonly id: string, readonly testers: Tester[]) {}\n\n displayConfig() {\n return this.testers\n .map((tester) => {\n return `${tester.displayName}\\n${tester.displayConfig}\\n`;\n })\n .join('\\n');\n }\n\n async test(context: TesterContext): Promise<Tests> {\n const allResults = await pMapSeries(this.testers, (tester) => {\n return tester.test(context);\n });\n const merged = this.mergeTests(allResults);\n return merged;\n }\n\n // TODO: not working properly yet\n async watch(context: TesterContext): Promise<Tests> {\n const allResults = await pMapSeries(this.testers, (tester) => {\n return tester.watch ? tester.watch(context) : tester.test(context);\n });\n const merged = this.mergeTests(allResults);\n return merged;\n }\n\n /**\n * returns the version of all testers instance (e.g. '4.0.1').\n */\n version(): string {\n return this.testers\n .map((tester) => {\n return `${tester.displayName}@${tester.version()}`;\n })\n .join('\\n');\n }\n\n private mergeTests(tests: Tests[]): Tests {\n const componentResultsMap = new Map<string, ComponentsResults>();\n\n compact(tests).forEach((currentTests) => {\n currentTests.components.forEach((currentComponentResults) => {\n const currIdStr = currentComponentResults.componentId.toString();\n const foundComponent = componentResultsMap.get(currIdStr);\n if (foundComponent) {\n componentResultsMap.set(currIdStr, this.mergeComponentResults(foundComponent, currentComponentResults));\n } else {\n componentResultsMap.set(currIdStr, currentComponentResults);\n }\n });\n });\n\n return new Tests(Array.from(componentResultsMap.values()));\n }\n\n private mergeComponentResults(results1: ComponentsResults, results2: ComponentsResults): ComponentsResults {\n const merged: ComponentsResults = {\n componentId: results1.componentId,\n };\n let start;\n if (!results1.results?.start) {\n start = results2.results?.start;\n } else if (!results2.results?.start) {\n start = results1.results?.start;\n } else {\n // Take sooner start\n start = results1.results?.start < results2.results?.start ? results1.results?.start : results2.results?.start;\n }\n const mergedTestsResults: TestsResult = new TestsResult(\n [...(results1.results?.testFiles || []), ...(results2.results?.testFiles || [])],\n results1.results?.success && results2.results?.success,\n start\n );\n merged.results = mergedTestsResults;\n merged.errors = [...(results1.errors || []), ...(results2.errors || [])];\n merged.loading = results1.loading || results2.loading;\n return merged;\n }\n}\n"],"mappings":";;;;;;AAAA,SAAAA,YAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,WAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,QAAA;EAAA,MAAAH,IAAA,GAAAE,OAAA;EAAAC,OAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,cAAA;EAAA,MAAAJ,IAAA,GAAAE,OAAA;EAAAE,aAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAK,QAAA;EAAA,MAAAL,IAAA,GAAAE,OAAA;EAAAG,OAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAAiC,SAAAC,uBAAAK,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,SAAAG,gB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AE,CAAC,CAAC;IACxE/B,MAAM,CAACgC,OAAO,GAAGT,QAAQ,CAACS,OAAO,IAAIR,QAAQ,CAACQ,OAAO;IACrD,OAAOhC,MAAM;EACf;AACF;AAACiC,OAAA,CAAA9C,WAAA,GAAAA,WAAA","ignoreList":[]}
1
+ {"version":3,"names":["_pMapSeries","data","_interopRequireDefault","require","_tester","_testsResults","_lodash","e","__esModule","default","_defineProperty","r","t","_toPropertyKey","Object","defineProperty","value","enumerable","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","MultiTester","constructor","id","testers","displayConfig","map","tester","displayName","join","test","context","allResults","pMapSeries","merged","mergeTests","watch","version","tests","componentResultsMap","Map","compact","forEach","currentTests","components","currentComponentResults","currIdStr","componentId","toString","foundComponent","get","set","mergeComponentResults","Tests","Array","from","values","results1","results2","start","results","mergedTestsResults","TestsResult","testFiles","success","errors","loading","exports"],"sources":["multi-tester.tester.ts"],"sourcesContent":["import pMapSeries from 'p-map-series';\nimport { Tester, TesterContext, Tests, ComponentsResults } from '@teambit/tester';\nimport { TestsResult } from '@teambit/tests-results';\nimport { compact } from 'lodash';\n\nexport type MultiCompilerOptions = {\n targetExtension?: string;\n};\n\nexport class MultiTester implements Tester {\n displayName = 'Multi tester';\n\n constructor(\n readonly id: string,\n readonly testers: Tester[]\n ) {}\n\n displayConfig() {\n return this.testers\n .map((tester) => {\n return `${tester.displayName}\\n${tester.displayConfig}\\n`;\n })\n .join('\\n');\n }\n\n async test(context: TesterContext): Promise<Tests> {\n const allResults = await pMapSeries(this.testers, (tester) => {\n return tester.test(context);\n });\n const merged = this.mergeTests(allResults);\n return merged;\n }\n\n // TODO: not working properly yet\n async watch(context: TesterContext): Promise<Tests> {\n const allResults = await pMapSeries(this.testers, (tester) => {\n return tester.watch ? tester.watch(context) : tester.test(context);\n });\n const merged = this.mergeTests(allResults);\n return merged;\n }\n\n /**\n * returns the version of all testers instance (e.g. '4.0.1').\n */\n version(): string {\n return this.testers\n .map((tester) => {\n return `${tester.displayName}@${tester.version()}`;\n })\n .join('\\n');\n }\n\n private mergeTests(tests: Tests[]): Tests {\n const componentResultsMap = new Map<string, ComponentsResults>();\n\n compact(tests).forEach((currentTests) => {\n currentTests.components.forEach((currentComponentResults) => {\n const currIdStr = currentComponentResults.componentId.toString();\n const foundComponent = componentResultsMap.get(currIdStr);\n if (foundComponent) {\n componentResultsMap.set(currIdStr, this.mergeComponentResults(foundComponent, currentComponentResults));\n } else {\n componentResultsMap.set(currIdStr, currentComponentResults);\n }\n });\n });\n\n return new Tests(Array.from(componentResultsMap.values()));\n }\n\n private mergeComponentResults(results1: ComponentsResults, results2: ComponentsResults): ComponentsResults {\n const merged: ComponentsResults = {\n componentId: results1.componentId,\n };\n let start;\n if (!results1.results?.start) {\n start = results2.results?.start;\n } else if (!results2.results?.start) {\n start = results1.results?.start;\n } else {\n // Take sooner start\n start = results1.results?.start < results2.results?.start ? results1.results?.start : results2.results?.start;\n }\n const mergedTestsResults: TestsResult = new TestsResult(\n [...(results1.results?.testFiles || []), ...(results2.results?.testFiles || [])],\n results1.results?.success && results2.results?.success,\n start\n );\n merged.results = mergedTestsResults;\n merged.errors = [...(results1.errors || []), ...(results2.errors || [])];\n merged.loading = results1.loading || results2.loading;\n return merged;\n }\n}\n"],"mappings":";;;;;;AAAA,SAAAA,YAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,WAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,QAAA;EAAA,MAAAH,IAAA,GAAAE,OAAA;EAAAC,OAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,cAAA;EAAA,MAAAJ,IAAA,GAAAE,OAAA;EAAAE,aAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAK,QAAA;EA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IN,QAAQ,CAACE,OAAO,EAAEI,OAAO,EACtDL,KACF,CAAC;IACDzB,MAAM,CAAC0B,OAAO,GAAGC,kBAAkB;IACnC3B,MAAM,CAAC+B,MAAM,GAAG,CAAC,IAAIR,QAAQ,CAACQ,MAAM,IAAI,EAAE,CAAC,EAAE,IAAIP,QAAQ,CAACO,MAAM,IAAI,EAAE,CAAC,CAAC;IACxE/B,MAAM,CAACgC,OAAO,GAAGT,QAAQ,CAACS,OAAO,IAAIR,QAAQ,CAACQ,OAAO;IACrD,OAAOhC,MAAM;EACf;AACF;AAACiC,OAAA,CAAA9C,WAAA,GAAAA,WAAA","ignoreList":[]}
@@ -1,5 +1,5 @@
1
- import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.defender_multi-tester@1.0.424/dist/multi-tester.composition.js';
2
- import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.defender_multi-tester@1.0.424/dist/multi-tester.docs.mdx';
1
+ import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.defender_multi-tester@1.0.426/dist/multi-tester.composition.js';
2
+ import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.defender_multi-tester@1.0.426/dist/multi-tester.docs.mdx';
3
3
 
4
4
  export const compositions = [compositions_0];
5
5
  export const overview = [overview_0];
package/package.json CHANGED
@@ -1,21 +1,21 @@
1
1
  {
2
2
  "name": "@teambit/multi-tester",
3
- "version": "1.0.424",
3
+ "version": "1.0.426",
4
4
  "homepage": "https://bit.cloud/teambit/defender/multi-tester",
5
5
  "main": "dist/index.js",
6
6
  "componentId": {
7
7
  "scope": "teambit.defender",
8
8
  "name": "multi-tester",
9
- "version": "1.0.424"
9
+ "version": "1.0.426"
10
10
  },
11
11
  "dependencies": {
12
12
  "lodash": "4.17.21",
13
13
  "p-map-series": "2.1.0",
14
14
  "@teambit/harmony": "0.4.6",
15
15
  "@teambit/tests-results": "1.0.5",
16
- "@teambit/cli": "0.0.1001",
17
- "@teambit/logger": "0.0.1094",
18
- "@teambit/tester": "1.0.424"
16
+ "@teambit/cli": "0.0.1003",
17
+ "@teambit/logger": "0.0.1096",
18
+ "@teambit/tester": "1.0.426"
19
19
  },
20
20
  "devDependencies": {
21
21
  "@types/lodash": "4.14.165",