@teambit/mocha 1.0.281 → 1.0.283
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_mocha-preview.js +1 -1
- package/artifacts/schema.json +1 -1
- package/dist/mocha.composition.js +1 -1
- package/dist/mocha.composition.js.map +1 -1
- package/dist/mocha.main.runtime.js +1 -1
- package/dist/mocha.main.runtime.js.map +1 -1
- package/dist/mocha.tester.js +2 -2
- package/dist/mocha.tester.js.map +1 -1
- package/dist/{preview-1716434516635.js → preview-1716607230882.js} +2 -2
- package/package.json +3 -3
@@ -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/mocha@1.0.
|
3
|
+
<testsuite name="teambit.defender/mocha@1.0.283" 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/mocha-preview"]=t():e["teambit.defender/mocha-preview"]=t()}(self,(()=>(()=>{"use strict";var e={
|
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/mocha-preview"]=t():e["teambit.defender/mocha-preview"]=t()}(self,(()=>(()=>{"use strict";var e={29744:(e,t,o)=>{var r={id:"teambit.defender/mocha@1.0.283",homepage:"https://bit.cloud/teambit/defender/mocha",exported:!0};function n(){const e=i(o(41594));return n=function(){return e},e}function i(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.Logo=void 0,n.__bit_component=r,i.__bit_component=r;const a=()=>n().default.createElement("div",{style:{height:"100%",display:"flex",justifyContent:"center"}},n().default.createElement("img",{style:{width:70},src:"https://static.bit.dev/extensions-icons/mocha.svg"}));a.__bit_component=r,t.Logo=a},41594:e=>{e.exports=React}},t={};function o(r){var n=t[r];if(void 0!==n)return n.exports;var i=t[r]={exports:{}};return e[r](i,i.exports,o),i.exports}o.d=(e,t)=>{for(var r in t)o.o(t,r)&&!o.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};return(()=>{o.r(r),o.d(r,{compositions:()=>f,compositions_metadata:()=>l,overview:()=>u});var e={};o.r(e),o.d(e,{default:()=>s});var t=o(29744);o(41594);const n=MdxJsReact,i=TeambitMdxUiMdxScopeContext;var a=["components"];function c(){return c=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var r in o)({}).hasOwnProperty.call(o,r)&&(e[r]=o[r])}return e},c.apply(null,arguments)}var d={},p="wrapper";function s(e){var t=e.components,o=function(e,t){if(null==e)return{};var o,r,n=function(e,t){if(null==e)return{};var o={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;o[r]=e[r]}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)o=i[r],t.indexOf(o)>=0||{}.propertyIsEnumerable.call(e,o)&&(n[o]=e[o])}return n}(e,a);return(0,n.mdx)(p,c({},d,o,{components:t,mdxType:"MDXLayout"}),(0,n.mdx)(i.MDXScopeProvider,{components:{},mdxType:"MDXScopeProvider"}))}s.isMDXComponent=!0;const f=[t],u=[e],l={compositions:[{displayName:"Logo",identifier:"Logo"}]}})(),r})()));
|
package/artifacts/schema.json
CHANGED
@@ -11,7 +11,7 @@ function _react() {
|
|
11
11
|
};
|
12
12
|
return data;
|
13
13
|
}
|
14
|
-
function _interopRequireDefault(
|
14
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
15
15
|
const Logo = () => /*#__PURE__*/_react().default.createElement("div", {
|
16
16
|
style: {
|
17
17
|
height: '100%',
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["_react","data","_interopRequireDefault","require","
|
1
|
+
{"version":3,"names":["_react","data","_interopRequireDefault","require","e","__esModule","default","Logo","createElement","style","height","display","justifyContent","width","src","exports"],"sources":["mocha.composition.tsx"],"sourcesContent":["import React from 'react';\n\nexport const Logo = () => (\n <div style={{ height: '100%', display: 'flex', justifyContent: 'center' }}>\n <img style={{ width: 70 }} src=\"https://static.bit.dev/extensions-icons/mocha.svg\" />\n </div>\n);\n"],"mappings":";;;;;;AAAA,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,MAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAA0B,SAAAC,uBAAAE,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAEnB,MAAMG,IAAI,GAAGA,CAAA,kBAClBP,MAAA,GAAAM,OAAA,CAAAE,aAAA;EAAKC,KAAK,EAAE;IAAEC,MAAM,EAAE,MAAM;IAAEC,OAAO,EAAE,MAAM;IAAEC,cAAc,EAAE;EAAS;AAAE,gBACxEZ,MAAA,GAAAM,OAAA,CAAAE,aAAA;EAAKC,KAAK,EAAE;IAAEI,KAAK,EAAE;EAAG,CAAE;EAACC,GAAG,EAAC;AAAmD,CAAE,CACjF,CACN;AAACC,OAAA,CAAAR,IAAA,GAAAA,IAAA","ignoreList":[]}
|
@@ -32,7 +32,7 @@ function _mocha2() {
|
|
32
32
|
};
|
33
33
|
return data;
|
34
34
|
}
|
35
|
-
function _defineProperty(
|
35
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
36
36
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
37
37
|
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
38
38
|
class MochaMain {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["_cli","data","require","_logger","_mocha","_mocha2","_defineProperty","
|
1
|
+
{"version":3,"names":["_cli","data","require","_logger","_mocha","_mocha2","_defineProperty","e","r","t","_toPropertyKey","Object","defineProperty","value","enumerable","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","MochaMain","constructor","logger","createTester","mochaConfig","babelConfig","mochaModule","MochaTester","MochaAspect","id","provider","loggerMain","createLogger","exports","LoggerAspect","MainRuntime","addRuntime"],"sources":["mocha.main.runtime.ts"],"sourcesContent":["import { MainRuntime } from '@teambit/cli';\nimport type { TransformOptions } from '@babel/core';\nimport type Mocha from 'mocha';\nimport { Logger, LoggerAspect, LoggerMain } from '@teambit/logger';\nimport { MochaAspect } from './mocha.aspect';\nimport { MochaTester } from './mocha.tester';\n\nexport class MochaMain {\n constructor(private logger: Logger) {}\n\n createTester(\n mochaConfig: Mocha.MochaOptions = {},\n babelConfig: TransformOptions = {},\n // eslint-disable-next-line global-require\n mochaModule = require('mocha')\n ) {\n return new MochaTester(MochaAspect.id, this.logger, mochaConfig, babelConfig, mochaModule);\n }\n\n static slots = [];\n static dependencies = [LoggerAspect];\n static runtime = MainRuntime;\n static async provider([loggerMain]: [LoggerMain]) {\n const logger = loggerMain.createLogger(MochaAspect.id);\n return new MochaMain(logger);\n }\n}\n\nMochaAspect.addRuntime(MochaMain);\n"],"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tC,MAAMgB,SAAS,CAAC;EACrBC,WAAWA,CAASC,MAAc,EAAE;IAAA,KAAhBA,MAAc,GAAdA,MAAc;EAAG;EAErCC,YAAYA,CACVC,WAA+B,GAAG,CAAC,CAAC,EACpCC,WAA6B,GAAG,CAAC,CAAC;EAClC;EACAC,WAAW,GAAG7B,OAAO,CAAC,OAAO,CAAC,EAC9B;IACA,OAAO,KAAI8B,qBAAW,EAACC,oBAAW,CAACC,EAAE,EAAE,IAAI,CAACP,MAAM,EAAEE,WAAW,EAAEC,WAAW,EAAEC,WAAW,CAAC;EAC5F;EAKA,aAAaI,QAAQA,CAAC,CAACC,UAAU,CAAe,EAAE;IAChD,MAAMT,MAAM,GAAGS,UAAU,CAACC,YAAY,CAACJ,oBAAW,CAACC,EAAE,CAAC;IACtD,OAAO,IAAIT,SAAS,CAACE,MAAM,CAAC;EAC9B;AACF;AAACW,OAAA,CAAAb,SAAA,GAAAA,SAAA;AAAAnB,eAAA,CAnBYmB,SAAS,WAYL,EAAE;AAAAnB,eAAA,CAZNmB,SAAS,kBAaE,CAACc,sBAAY,CAAC;AAAAjC,eAAA,CAbzBmB,SAAS,aAcHe,kBAAW;AAO9BP,oBAAW,CAACQ,UAAU,CAAChB,SAAS,CAAC","ignoreList":[]}
|
package/dist/mocha.tester.js
CHANGED
@@ -46,10 +46,10 @@ function _lodash() {
|
|
46
46
|
};
|
47
47
|
return data;
|
48
48
|
}
|
49
|
-
function _interopRequireDefault(
|
49
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
50
50
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
51
51
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
52
|
-
function _defineProperty(
|
52
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
53
53
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
54
54
|
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
55
55
|
class MochaTester {
|
package/dist/mocha.tester.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["_tester","data","require","_mocha","_interopRequireDefault","_register","_testsResults","_pMapSeries","_lodash","obj","__esModule","default","ownKeys","e","r","t","Object","keys","getOwnPropertySymbols","o","filter","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","defineProperty","key","value","_toPropertyKey","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","MochaTester","constructor","id","logger","mochaConfig","babelConfig","MochaModule","test","context","ui","Tests","clearStatusLine","specsPerComp","specFiles","toArray","babelRegister","extensions","componentsResults","pMapSeries","component","files","testsFiles","file","runMochaOnOneFile","err","errMsg","path","message","error","consoleFailure","TestsFiles","relative","undefined","allComponentErrors","map","testFile","tests","failureErrOrStr","flat","componentId","results","TestsResult","errors","compact","onTestRunComplete","callback","_callback","mocha","addFile","testResults","handleTest","state","Error","title","TestResult","titlePath","duration","Promise","resolve","runner","run","on","type","stats","testsFile","passes","failures","pending","version","Mocha","prototype","exports"],"sources":["mocha.tester.ts"],"sourcesContent":["import { Logger } from '@teambit/logger';\nimport { ComponentsResults, Tester, CallbackFn, TesterContext, Tests } from '@teambit/tester';\nimport Mocha, { Test } from 'mocha';\nimport babelRegister from '@babel/register';\nimport type { TransformOptions } from '@babel/core';\nimport { TestResult, TestsFiles, TestsResult } from '@teambit/tests-results';\nimport pMapSeries from 'p-map-series';\nimport { AbstractVinyl } from '@teambit/legacy/dist/consumer/component/sources';\nimport { compact } from 'lodash';\n\nexport class MochaTester implements Tester {\n _callback: CallbackFn | undefined;\n displayName = 'Mocha';\n constructor(\n readonly id: string,\n private logger: Logger,\n readonly mochaConfig: Mocha.MochaOptions,\n /**\n * babel config are needed when the spec files are not native javascript and need to be compiled.\n * pass the same config you pass to your babel compiler if you're using one.\n */\n private babelConfig: TransformOptions,\n private MochaModule: typeof Mocha\n ) {}\n async test(context: TesterContext): Promise<Tests> {\n if (context.ui) {\n // @todo: maybe support UI tests at some point\n return new Tests([]);\n }\n this.logger.clearStatusLine();\n const specsPerComp = context.specFiles.toArray();\n babelRegister({\n extensions: ['.es6', '.es', '.jsx', '.js', '.mjs', '.ts', '.tsx'],\n ...(this.babelConfig || {}),\n });\n const componentsResults: ComponentsResults[] = await pMapSeries(specsPerComp, async ([component, files]) => {\n const testsFiles: TestsFiles[] = await pMapSeries(files, async (file) => {\n try {\n return await this.runMochaOnOneFile(file);\n } catch (err: any) {\n const errMsg = `Mocha found an error while working on \"${file.path}\". ${err.message}`;\n this.logger.error(errMsg, err);\n this.logger.consoleFailure(errMsg);\n return new TestsFiles(file.relative, [], 0, 0, 0, undefined, undefined, err);\n }\n });\n const allComponentErrors = testsFiles\n .map((testFile) => testFile.error || testFile.tests.map((test) => test.failureErrOrStr as Error))\n .flat();\n return {\n componentId: component.id,\n results: new TestsResult(testsFiles),\n errors: compact(allComponentErrors),\n };\n });\n return new Tests(componentsResults);\n }\n\n /**\n * @todo: make this work. currently, it doesn't update the UI upon changes.\n */\n // async watch(context: TesterContext): Promise<Tests> {\n // const results = await this.test(context);\n // if (this._callback) {\n // this._callback(results);\n // }\n // return results;\n // }\n\n async onTestRunComplete(callback: CallbackFn) {\n this._callback = callback;\n }\n\n private async runMochaOnOneFile(file: AbstractVinyl): Promise<TestsFiles> {\n const mocha = new this.MochaModule(this.mochaConfig);\n mocha.addFile(file.path);\n const testResults: TestResult[] = [];\n const handleTest = (test: Test) => {\n const state = test.state;\n if (!state) {\n throw new Error(`the test.state of \"${test.title}\", file \"${file.path}\" is neither passed nor failed`);\n }\n testResults.push(new TestResult(test.titlePath(), test.title, state, test.duration, undefined, test.err));\n };\n return new Promise((resolve) => {\n const runner = mocha\n .run()\n .on('test end', (test) => handleTest(test))\n .on('fail', (test) => {\n if (test.type !== 'test') {\n // otherwise, it was handled already in \"test end\" event.\n // this is mainly for test.type of \"hook\", e.g. \"before\", \"after\", \"beforeAll\", \"afterAll\"\n handleTest(test);\n }\n })\n .on('end', function () {\n const stats = runner.stats;\n if (!stats) throw new Error('stats is missing');\n const testsFile = new TestsFiles(\n file.relative,\n testResults,\n stats.passes,\n stats.failures,\n stats.pending,\n stats.duration\n );\n resolve(testsFile);\n });\n });\n }\n\n version(): string {\n // @ts-ignore\n return Mocha.prototype.version || 'N/A';\n }\n}\n"],"mappings":";;;;;;AACA,SAAAA,QAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,OAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,OAAA;EAAA,MAAAF,IAAA,GAAAG,sBAAA,CAAAF,OAAA;EAAAC,MAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,UAAA;EAAA,MAAAJ,IAAA,GAAAG,sBAAA,CAAAF,OAAA;EAAAG,SAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAK,cAA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EAAEzB,IAAI,CAACiB,GAAG,CAAC,CAAC;IAC3G,CAAC;IACD,OAAO,IAAIiC,OAAO,CAAEC,OAAO,IAAK;MAC9B,MAAMC,MAAM,GAAGZ,KAAK,CACjBa,GAAG,CAAC,CAAC,CACLC,EAAE,CAAC,UAAU,EAAGtD,IAAI,IAAK2C,UAAU,CAAC3C,IAAI,CAAC,CAAC,CAC1CsD,EAAE,CAAC,MAAM,EAAGtD,IAAI,IAAK;QACpB,IAAIA,IAAI,CAACuD,IAAI,KAAK,MAAM,EAAE;UACxB;UACA;UACAZ,UAAU,CAAC3C,IAAI,CAAC;QAClB;MACF,CAAC,CAAC,CACDsD,EAAE,CAAC,KAAK,EAAE,YAAY;QACrB,MAAME,KAAK,GAAGJ,MAAM,CAACI,KAAK;QAC1B,IAAI,CAACA,KAAK,EAAE,MAAM,IAAIX,KAAK,CAAC,kBAAkB,CAAC;QAC/C,MAAMY,SAAS,GAAG,KAAIlC,0BAAU,EAC9BR,IAAI,CAACS,QAAQ,EACbkB,WAAW,EACXc,KAAK,CAACE,MAAM,EACZF,KAAK,CAACG,QAAQ,EACdH,KAAK,CAACI,OAAO,EACbJ,KAAK,CAACP,QACR,CAAC;QACDE,OAAO,CAACM,SAAS,CAAC;MACpB,CAAC,CAAC;IACN,CAAC,CAAC;EACJ;EAEAI,OAAOA,CAAA,EAAW;IAChB;IACA,OAAOC,gBAAK,CAACC,SAAS,CAACF,OAAO,IAAI,KAAK;EACzC;AACF;AAACG,OAAA,CAAAvE,WAAA,GAAAA,WAAA","ignoreList":[]}
|
1
|
+
{"version":3,"names":["_tester","data","require","_mocha","_interopRequireDefault","_register","_testsResults","_pMapSeries","_lodash","e","__esModule","default","ownKeys","r","t","Object","keys","getOwnPropertySymbols","o","filter","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","defineProperty","_toPropertyKey","value","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","MochaTester","constructor","id","logger","mochaConfig","babelConfig","MochaModule","test","context","ui","Tests","clearStatusLine","specsPerComp","specFiles","toArray","babelRegister","extensions","componentsResults","pMapSeries","component","files","testsFiles","file","runMochaOnOneFile","err","errMsg","path","message","error","consoleFailure","TestsFiles","relative","undefined","allComponentErrors","map","testFile","tests","failureErrOrStr","flat","componentId","results","TestsResult","errors","compact","onTestRunComplete","callback","_callback","mocha","addFile","testResults","handleTest","state","Error","title","TestResult","titlePath","duration","Promise","resolve","runner","run","on","type","stats","testsFile","passes","failures","pending","version","Mocha","prototype","exports"],"sources":["mocha.tester.ts"],"sourcesContent":["import { Logger } from '@teambit/logger';\nimport { ComponentsResults, Tester, CallbackFn, TesterContext, Tests } from '@teambit/tester';\nimport Mocha, { Test } from 'mocha';\nimport babelRegister from '@babel/register';\nimport type { TransformOptions } from '@babel/core';\nimport { TestResult, TestsFiles, TestsResult } from '@teambit/tests-results';\nimport pMapSeries from 'p-map-series';\nimport { AbstractVinyl } from '@teambit/legacy/dist/consumer/component/sources';\nimport { compact } from 'lodash';\n\nexport class MochaTester implements Tester {\n _callback: CallbackFn | undefined;\n displayName = 'Mocha';\n constructor(\n readonly id: string,\n private logger: Logger,\n readonly mochaConfig: Mocha.MochaOptions,\n /**\n * babel config are needed when the spec files are not native javascript and need to be compiled.\n * pass the same config you pass to your babel compiler if you're using one.\n */\n private babelConfig: TransformOptions,\n private MochaModule: typeof Mocha\n ) {}\n async test(context: TesterContext): Promise<Tests> {\n if (context.ui) {\n // @todo: maybe support UI tests at some point\n return new Tests([]);\n }\n this.logger.clearStatusLine();\n const specsPerComp = context.specFiles.toArray();\n babelRegister({\n extensions: ['.es6', '.es', '.jsx', '.js', '.mjs', '.ts', '.tsx'],\n ...(this.babelConfig || {}),\n });\n const componentsResults: ComponentsResults[] = await pMapSeries(specsPerComp, async ([component, files]) => {\n const testsFiles: TestsFiles[] = await pMapSeries(files, async (file) => {\n try {\n return await this.runMochaOnOneFile(file);\n } catch (err: any) {\n const errMsg = `Mocha found an error while working on \"${file.path}\". ${err.message}`;\n this.logger.error(errMsg, err);\n this.logger.consoleFailure(errMsg);\n return new TestsFiles(file.relative, [], 0, 0, 0, undefined, undefined, err);\n }\n });\n const allComponentErrors = testsFiles\n .map((testFile) => testFile.error || testFile.tests.map((test) => test.failureErrOrStr as Error))\n .flat();\n return {\n componentId: component.id,\n results: new TestsResult(testsFiles),\n errors: compact(allComponentErrors),\n };\n });\n return new Tests(componentsResults);\n }\n\n /**\n * @todo: make this work. currently, it doesn't update the UI upon changes.\n */\n // async watch(context: TesterContext): Promise<Tests> {\n // const results = await this.test(context);\n // if (this._callback) {\n // this._callback(results);\n // }\n // return results;\n // }\n\n async onTestRunComplete(callback: CallbackFn) {\n this._callback = callback;\n }\n\n private async runMochaOnOneFile(file: AbstractVinyl): Promise<TestsFiles> {\n const mocha = new this.MochaModule(this.mochaConfig);\n mocha.addFile(file.path);\n const testResults: TestResult[] = [];\n const handleTest = (test: Test) => {\n const state = test.state;\n if (!state) {\n throw new Error(`the test.state of \"${test.title}\", file \"${file.path}\" is neither passed nor failed`);\n }\n testResults.push(new TestResult(test.titlePath(), test.title, state, test.duration, undefined, test.err));\n };\n return new Promise((resolve) => {\n const runner = mocha\n .run()\n .on('test end', (test) => handleTest(test))\n .on('fail', (test) => {\n if (test.type !== 'test') {\n // otherwise, it was handled already in \"test end\" event.\n // this is mainly for test.type of \"hook\", e.g. \"before\", \"after\", \"beforeAll\", \"afterAll\"\n handleTest(test);\n }\n })\n .on('end', function () {\n const stats = runner.stats;\n if (!stats) throw new Error('stats is missing');\n const testsFile = new TestsFiles(\n file.relative,\n testResults,\n stats.passes,\n stats.failures,\n stats.pending,\n stats.duration\n );\n resolve(testsFile);\n });\n });\n }\n\n version(): string {\n // @ts-ignore\n return Mocha.prototype.version || 'N/A';\n }\n}\n"],"mappings":";;;;;;AACA,SAAAA,QAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,OAAA,YAAA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AO,IAAI,KAAK;EACzC;AACF;AAACG,OAAA,CAAAvE,WAAA,GAAAA,WAAA","ignoreList":[]}
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.defender_mocha@1.0.
|
2
|
-
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.defender_mocha@1.0.
|
1
|
+
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.defender_mocha@1.0.283/dist/mocha.composition.js';
|
2
|
+
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.defender_mocha@1.0.283/dist/mocha.docs.mdx';
|
3
3
|
|
4
4
|
export const compositions = [compositions_0];
|
5
5
|
export const overview = [overview_0];
|
package/package.json
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
{
|
2
2
|
"name": "@teambit/mocha",
|
3
|
-
"version": "1.0.
|
3
|
+
"version": "1.0.283",
|
4
4
|
"homepage": "https://bit.cloud/teambit/defender/mocha",
|
5
5
|
"main": "dist/index.js",
|
6
6
|
"componentId": {
|
7
7
|
"scope": "teambit.defender",
|
8
8
|
"name": "mocha",
|
9
|
-
"version": "1.0.
|
9
|
+
"version": "1.0.283"
|
10
10
|
},
|
11
11
|
"dependencies": {
|
12
12
|
"@babel/core": "7.19.6",
|
@@ -17,7 +17,7 @@
|
|
17
17
|
"@teambit/tests-results": "1.0.4",
|
18
18
|
"@teambit/cli": "0.0.865",
|
19
19
|
"@teambit/logger": "0.0.958",
|
20
|
-
"@teambit/tester": "1.0.
|
20
|
+
"@teambit/tester": "1.0.283"
|
21
21
|
},
|
22
22
|
"devDependencies": {
|
23
23
|
"@types/mocha": "9.1.0",
|