allure-mocha 3.14.0 → 3.16.0
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/README.md +3 -3
- package/dist/cjs/AllureMochaReporter.js +30 -18
- package/dist/cjs/AllureMochaReporter.js.map +1 -1
- package/dist/cjs/extraReporters.js +17 -3
- package/dist/cjs/extraReporters.js.map +1 -1
- package/dist/cjs/legacy.js +3 -4
- package/dist/cjs/legacy.js.map +1 -1
- package/dist/cjs/setupAllureMochaParallel.js +15 -5
- package/dist/cjs/setupAllureMochaParallel.js.map +1 -1
- package/dist/cjs/types.js.map +1 -1
- package/dist/cjs/utils.js +17 -9
- package/dist/cjs/utils.js.map +1 -1
- package/dist/esm/AllureMochaReporter.js +30 -18
- package/dist/esm/AllureMochaReporter.js.map +1 -1
- package/dist/esm/extraReporters.js +17 -3
- package/dist/esm/extraReporters.js.map +1 -1
- package/dist/esm/legacy.js +3 -4
- package/dist/esm/legacy.js.map +1 -1
- package/dist/esm/setupAllureMochaParallel.js +14 -2
- package/dist/esm/setupAllureMochaParallel.js.map +1 -1
- package/dist/esm/types.js.map +1 -1
- package/dist/esm/utils.js +17 -9
- package/dist/esm/utils.js.map +1 -1
- package/dist/types/AllureMochaReporter.d.ts +1 -1
- package/dist/types/extraReporters.d.ts +1 -1
- package/dist/types/types.d.ts +4 -1
- package/dist/types/utils.d.ts +1 -1
- package/package.json +15 -15
package/dist/esm/utils.js
CHANGED
|
@@ -27,18 +27,24 @@ var createAllureFullName = test => {
|
|
|
27
27
|
var fullNameBase = test.file ? "".concat(getPosixPath(getRelativePath(test.file)), ": ").concat(titlePath) : titlePath;
|
|
28
28
|
return projectName ? "".concat(projectName, ":").concat(fullNameBase) : fullNameBase;
|
|
29
29
|
};
|
|
30
|
-
var createTestPlanSelectorIndex =
|
|
31
|
-
var createTestPlanIdIndex =
|
|
30
|
+
var createTestPlanSelectorIndex = tests => createTestPlanIndex(e => e.selector, tests);
|
|
31
|
+
var createTestPlanIdIndex = tests => createTestPlanIndex(e => {
|
|
32
32
|
var _e$id;
|
|
33
33
|
return (_e$id = e.id) === null || _e$id === void 0 ? void 0 : _e$id.toString();
|
|
34
|
-
},
|
|
35
|
-
var createTestPlanIndex = (keySelector,
|
|
34
|
+
}, tests);
|
|
35
|
+
var createTestPlanIndex = (keySelector, tests) => new Set(tests.map(e => keySelector(e)).filter(v => v));
|
|
36
36
|
export var createTestPlanIndices = () => {
|
|
37
|
-
var testplan = parseTestPlan(
|
|
37
|
+
var testplan = parseTestPlan({
|
|
38
|
+
enableExcludedTests: true
|
|
39
|
+
});
|
|
38
40
|
if (testplan) {
|
|
41
|
+
var _testplan$excludedTes, _testplan$excludedTes2;
|
|
39
42
|
return {
|
|
40
|
-
fullNameIndex: createTestPlanSelectorIndex(testplan),
|
|
41
|
-
idIndex: createTestPlanIdIndex(testplan)
|
|
43
|
+
fullNameIndex: createTestPlanSelectorIndex(testplan.tests),
|
|
44
|
+
idIndex: createTestPlanIdIndex(testplan.tests),
|
|
45
|
+
excludedFullNameIndex: createTestPlanSelectorIndex((_testplan$excludedTes = testplan.excludedTests) !== null && _testplan$excludedTes !== void 0 ? _testplan$excludedTes : []),
|
|
46
|
+
excludedIdIndex: createTestPlanIdIndex((_testplan$excludedTes2 = testplan.excludedTests) !== null && _testplan$excludedTes2 !== void 0 ? _testplan$excludedTes2 : []),
|
|
47
|
+
hasSelection: testplan.tests.length > 0
|
|
42
48
|
};
|
|
43
49
|
}
|
|
44
50
|
};
|
|
@@ -71,13 +77,15 @@ export var getLegacyTestCaseId = test => {
|
|
|
71
77
|
var suiteTitles = test.titlePath().slice(0, -1);
|
|
72
78
|
return md5(JSON.stringify([testFilePath, ...suiteTitles, getAllureDisplayName(test)]));
|
|
73
79
|
};
|
|
74
|
-
export var applyTestPlan = (
|
|
80
|
+
export var applyTestPlan = (plan, rootSuite) => {
|
|
75
81
|
var suiteQueue = [];
|
|
76
82
|
for (var s = rootSuite; s; s = suiteQueue.shift()) {
|
|
77
83
|
for (var test of s.tests) {
|
|
78
84
|
var allureData = getAllureData(test);
|
|
79
85
|
var allureId = getAllureId(allureData);
|
|
80
|
-
|
|
86
|
+
var selected = !plan.hasSelection || plan.fullNameIndex.has(allureData.fullName) || allureId && plan.idIndex.has(allureId);
|
|
87
|
+
var excluded = plan.excludedFullNameIndex.has(allureData.fullName) || allureId && plan.excludedIdIndex.has(allureId);
|
|
88
|
+
if (!selected || excluded) {
|
|
81
89
|
allureData.isIncludedInTestRun = false;
|
|
82
90
|
test.pending = true;
|
|
83
91
|
}
|
package/dist/esm/utils.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","names":["dirname","extname","join","fileURLToPath","LabelName","extractMetadataFromString","getPosixPath","getProjectName","getRelativePath","md5","parseTestPlan","filename","import","meta","url","allureMochaDataKey","Symbol","getAllureData","item","data","title","defaultData","isIncludedInTestRun","fullName","createAllureFullName","labels","links","displayName","cleanTitle","test","titlePath","projectName","fullNameBase","file","concat","createTestPlanSelectorIndex","testplan","createTestPlanIndex","e","selector","createTestPlanIdIndex","_e$id","id","toString","keySelector","Set","tests","map","filter","v","createTestPlanIndices","fullNameIndex","idIndex","getAllureFullName","getAllureMetaLabels","getAllureMetaLinks","getAllureId","values","l","name","ALLURE_ID","value","length","getAllureDisplayName","getTestScope","scope","setTestScope","getSuitesOfMochaTest","slice","resolveParallelModeSetupFile","getTestCaseId","testFilePath","testFileId","suiteTitles","JSON","stringify","getLegacyTestCaseId","applyTestPlan","ids","selectors","rootSuite","suiteQueue","s","shift","allureData","allureId","has","pending","push","suites","hookTypeRegexp","getHookType","hook","match","exec"],"sources":["../../src/utils.ts"],"sourcesContent":["import { dirname, extname, join } from \"node:path\";\nimport { fileURLToPath } from \"node:url\";\n\nimport { LabelName } from \"allure-js-commons\";\nimport type { TestPlanV1, TestPlanV1Test } from \"allure-js-commons/sdk\";\nimport { extractMetadataFromString } from \"allure-js-commons/sdk\";\nimport { getPosixPath, getProjectName, getRelativePath, md5, parseTestPlan } from \"allure-js-commons/sdk/reporter\";\nimport type * as Mocha from \"mocha\";\n\nimport type { AllureMochaTestData, HookCategory, HookScope, HookType, TestPlanIndices } from \"./types.js\";\n\nconst filename = fileURLToPath(import.meta.url);\n\nconst allureMochaDataKey = Symbol(\"Used to access Allure extra data in Mocha objects\");\n\nconst getAllureData = (item: Mocha.Test): AllureMochaTestData => {\n const data = (item as any)[allureMochaDataKey];\n\n if (!data) {\n const meta = extractMetadataFromString(item.title);\n const defaultData: AllureMochaTestData = {\n isIncludedInTestRun: true,\n fullName: createAllureFullName(item),\n labels: meta.labels,\n links: meta.links,\n displayName: meta.cleanTitle,\n };\n\n (item as any)[allureMochaDataKey] = defaultData;\n\n return defaultData;\n }\n\n return data;\n};\n\nconst createAllureFullName = (test: Mocha.Test) => {\n const titlePath = test.titlePath().join(\" > \");\n const projectName = getProjectName();\n const fullNameBase = test.file ? `${getPosixPath(getRelativePath(test.file))}: ${titlePath}` : titlePath;\n\n return projectName ? `${projectName}:${fullNameBase}` : fullNameBase;\n};\n\nconst createTestPlanSelectorIndex = (testplan: TestPlanV1) => createTestPlanIndex((e) => e.selector, testplan);\n\nconst createTestPlanIdIndex = (testplan: TestPlanV1) => createTestPlanIndex((e) => e.id?.toString(), testplan);\n\nconst createTestPlanIndex = <T>(keySelector: (entry: TestPlanV1Test) => T | undefined, testplan: TestPlanV1): Set<T> =>\n new Set(testplan.tests.map((e) => keySelector(e)).filter((v) => v)) as Set<T>;\n\nexport const createTestPlanIndices = (): TestPlanIndices | undefined => {\n const testplan = parseTestPlan();\n if (testplan) {\n return {\n fullNameIndex: createTestPlanSelectorIndex(testplan),\n idIndex: createTestPlanIdIndex(testplan),\n };\n }\n};\n\nexport const getAllureFullName = (test: Mocha.Test) => getAllureData(test).fullName;\n\nexport const isIncludedInTestRun = (test: Mocha.Test) => getAllureData(test).isIncludedInTestRun;\n\nexport const getAllureMetaLabels = (test: Mocha.Test) => getAllureData(test).labels;\n\nexport const getAllureMetaLinks = (test: Mocha.Test) => getAllureData(test).links;\n\nexport const getAllureId = (data: AllureMochaTestData) => {\n const values = data.labels.filter((l) => l.name === LabelName.ALLURE_ID).map((l) => l.value);\n if (values.length) {\n return values[0];\n }\n};\n\nexport const getAllureDisplayName = (test: Mocha.Test) => getAllureData(test).displayName;\n\nexport const getTestScope = (test: Mocha.Test) => getAllureData(test).scope;\n\nexport const setTestScope = (test: Mocha.Test, scope: string) => {\n getAllureData(test).scope = scope;\n};\n\nexport const getSuitesOfMochaTest = (test: Mocha.Test) => test.titlePath().slice(0, -1);\n\nexport const resolveParallelModeSetupFile = () =>\n join(dirname(filename), `setupAllureMochaParallel${extname(filename)}`);\n\nexport const getTestCaseId = (test: Mocha.Test) => {\n const projectName = getProjectName();\n const testFilePath = test.file ? getPosixPath(getRelativePath(test.file)) : \"\";\n const testFileId = projectName ? `${projectName}:${testFilePath}` : testFilePath;\n const suiteTitles = test.titlePath().slice(0, -1);\n return md5(JSON.stringify([testFileId, ...suiteTitles, getAllureDisplayName(test)]));\n};\n\nexport const getLegacyTestCaseId = (test: Mocha.Test) => {\n const testFilePath = test.file ? getPosixPath(getRelativePath(test.file)) : \"\";\n const suiteTitles = test.titlePath().slice(0, -1);\n return md5(JSON.stringify([testFilePath, ...suiteTitles, getAllureDisplayName(test)]));\n};\n\nexport const applyTestPlan = (ids: ReadonlySet<string>, selectors: ReadonlySet<string>, rootSuite: Mocha.Suite) => {\n const suiteQueue = [];\n for (let s: Mocha.Suite | undefined = rootSuite; s; s = suiteQueue.shift()) {\n for (const test of s.tests) {\n const allureData = getAllureData(test);\n const allureId = getAllureId(allureData);\n if (!selectors.has(allureData.fullName) && (!allureId || !ids.has(allureId))) {\n allureData.isIncludedInTestRun = false;\n test.pending = true;\n }\n }\n suiteQueue.push(...s.suites);\n }\n};\n\nconst hookTypeRegexp = /^\"(before|after) (all|each)\"/;\n\nexport const getHookType = (hook: Mocha.Hook): HookType => {\n if (hook.title) {\n const match = hookTypeRegexp.exec(hook.title);\n if (match) {\n return [match[1] as HookCategory, match[2] as HookScope];\n }\n }\n return [];\n};\n"],"mappings":"AAAA,SAASA,OAAO,EAAEC,OAAO,EAAEC,IAAI,QAAQ,WAAW;AAClD,SAASC,aAAa,QAAQ,UAAU;AAExC,SAASC,SAAS,QAAQ,mBAAmB;AAE7C,SAASC,yBAAyB,QAAQ,uBAAuB;AACjE,SAASC,YAAY,EAAEC,cAAc,EAAEC,eAAe,EAAEC,GAAG,EAAEC,aAAa,QAAQ,gCAAgC;AAKlH,IAAMC,QAAQ,GAAGR,aAAa,CAACS,MAAM,CAACC,IAAI,CAACC,GAAG,CAAC;AAE/C,IAAMC,kBAAkB,GAAGC,MAAM,CAAC,mDAAmD,CAAC;AAEtF,IAAMC,aAAa,GAAIC,IAAgB,IAA0B;EAC/D,IAAMC,IAAI,GAAID,IAAI,CAASH,kBAAkB,CAAC;EAE9C,IAAI,CAACI,IAAI,EAAE;IACT,IAAMN,IAAI,GAAGR,yBAAyB,CAACa,IAAI,CAACE,KAAK,CAAC;IAClD,IAAMC,WAAgC,GAAG;MACvCC,mBAAmB,EAAE,IAAI;MACzBC,QAAQ,EAAEC,oBAAoB,CAACN,IAAI,CAAC;MACpCO,MAAM,EAAEZ,IAAI,CAACY,MAAM;MACnBC,KAAK,EAAEb,IAAI,CAACa,KAAK;MACjBC,WAAW,EAAEd,IAAI,CAACe;IACpB,CAAC;IAEAV,IAAI,CAASH,kBAAkB,CAAC,GAAGM,WAAW;IAE/C,OAAOA,WAAW;EACpB;EAEA,OAAOF,IAAI;AACb,CAAC;AAED,IAAMK,oBAAoB,GAAIK,IAAgB,IAAK;EACjD,IAAMC,SAAS,GAAGD,IAAI,CAACC,SAAS,CAAC,CAAC,CAAC5B,IAAI,CAAC,KAAK,CAAC;EAC9C,IAAM6B,WAAW,GAAGxB,cAAc,CAAC,CAAC;EACpC,IAAMyB,YAAY,GAAGH,IAAI,CAACI,IAAI,MAAAC,MAAA,CA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AAS,CAACO,GAAG,CAACF,UAAU,CAAC7D,QAAQ,CAAC,KAAK,CAAC8D,QAAQ,IAAI,CAACP,GAAG,CAACQ,GAAG,CAACD,QAAQ,CAAC,CAAC,EAAE;QAC5ED,UAAU,CAAC9D,mBAAmB,GAAG,KAAK;QACtCO,IAAI,CAAC0D,OAAO,GAAG,IAAI;MACrB;IACF;IACAN,UAAU,CAACO,IAAI,CAAC,GAAGN,CAAC,CAACO,MAAM,CAAC;EAC9B;AACF,CAAC;AAED,IAAMC,cAAc,GAAG,8BAA8B;AAErD,OAAO,IAAMC,WAAW,GAAIC,IAAgB,IAAe;EACzD,IAAIA,IAAI,CAACxE,KAAK,EAAE;IACd,IAAMyE,KAAK,GAAGH,cAAc,CAACI,IAAI,CAACF,IAAI,CAACxE,KAAK,CAAC;IAC7C,IAAIyE,KAAK,EAAE;MACT,OAAO,CAACA,KAAK,CAAC,CAAC,CAAC,EAAkBA,KAAK,CAAC,CAAC,CAAC,CAAc;IAC1D;EACF;EACA,OAAO,EAAE;AACX,CAAC","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"utils.js","names":["dirname","extname","join","fileURLToPath","LabelName","extractMetadataFromString","getPosixPath","getProjectName","getRelativePath","md5","parseTestPlan","filename","import","meta","url","allureMochaDataKey","Symbol","getAllureData","item","data","title","defaultData","isIncludedInTestRun","fullName","createAllureFullName","labels","links","displayName","cleanTitle","test","titlePath","projectName","fullNameBase","file","concat","createTestPlanSelectorIndex","tests","createTestPlanIndex","e","selector","createTestPlanIdIndex","_e$id","id","toString","keySelector","Set","map","filter","v","createTestPlanIndices","testplan","enableExcludedTests","_testplan$excludedTes","_testplan$excludedTes2","fullNameIndex","idIndex","excludedFullNameIndex","excludedTests","excludedIdIndex","hasSelection","length","getAllureFullName","getAllureMetaLabels","getAllureMetaLinks","getAllureId","values","l","name","ALLURE_ID","value","getAllureDisplayName","getTestScope","scope","setTestScope","getSuitesOfMochaTest","slice","resolveParallelModeSetupFile","getTestCaseId","testFilePath","testFileId","suiteTitles","JSON","stringify","getLegacyTestCaseId","applyTestPlan","plan","rootSuite","suiteQueue","s","shift","allureData","allureId","selected","has","excluded","pending","push","suites","hookTypeRegexp","getHookType","hook","match","exec"],"sources":["../../src/utils.ts"],"sourcesContent":["import { dirname, extname, join } from \"node:path\";\nimport { fileURLToPath } from \"node:url\";\n\nimport { LabelName } from \"allure-js-commons\";\nimport type { TestPlanV1Test } from \"allure-js-commons/sdk\";\nimport { extractMetadataFromString } from \"allure-js-commons/sdk\";\nimport { getPosixPath, getProjectName, getRelativePath, md5, parseTestPlan } from \"allure-js-commons/sdk/reporter\";\nimport type * as Mocha from \"mocha\";\n\nimport type { AllureMochaTestData, HookCategory, HookScope, HookType, TestPlanIndices } from \"./types.js\";\n\nconst filename = fileURLToPath(import.meta.url);\n\nconst allureMochaDataKey = Symbol(\"Used to access Allure extra data in Mocha objects\");\n\nconst getAllureData = (item: Mocha.Test): AllureMochaTestData => {\n const data = (item as any)[allureMochaDataKey];\n\n if (!data) {\n const meta = extractMetadataFromString(item.title);\n const defaultData: AllureMochaTestData = {\n isIncludedInTestRun: true,\n fullName: createAllureFullName(item),\n labels: meta.labels,\n links: meta.links,\n displayName: meta.cleanTitle,\n };\n\n (item as any)[allureMochaDataKey] = defaultData;\n\n return defaultData;\n }\n\n return data;\n};\n\nconst createAllureFullName = (test: Mocha.Test) => {\n const titlePath = test.titlePath().join(\" > \");\n const projectName = getProjectName();\n const fullNameBase = test.file ? `${getPosixPath(getRelativePath(test.file))}: ${titlePath}` : titlePath;\n\n return projectName ? `${projectName}:${fullNameBase}` : fullNameBase;\n};\n\nconst createTestPlanSelectorIndex = (tests: TestPlanV1Test[]) => createTestPlanIndex((e) => e.selector, tests);\n\nconst createTestPlanIdIndex = (tests: TestPlanV1Test[]) => createTestPlanIndex((e) => e.id?.toString(), tests);\n\nconst createTestPlanIndex = <T>(\n keySelector: (entry: TestPlanV1Test) => T | undefined,\n tests: TestPlanV1Test[],\n): Set<T> => new Set(tests.map((e) => keySelector(e)).filter((v) => v)) as Set<T>;\n\nexport const createTestPlanIndices = (): TestPlanIndices | undefined => {\n const testplan = parseTestPlan({ enableExcludedTests: true });\n if (testplan) {\n return {\n fullNameIndex: createTestPlanSelectorIndex(testplan.tests),\n idIndex: createTestPlanIdIndex(testplan.tests),\n excludedFullNameIndex: createTestPlanSelectorIndex(testplan.excludedTests ?? []),\n excludedIdIndex: createTestPlanIdIndex(testplan.excludedTests ?? []),\n hasSelection: testplan.tests.length > 0,\n };\n }\n};\n\nexport const getAllureFullName = (test: Mocha.Test) => getAllureData(test).fullName;\n\nexport const isIncludedInTestRun = (test: Mocha.Test) => getAllureData(test).isIncludedInTestRun;\n\nexport const getAllureMetaLabels = (test: Mocha.Test) => getAllureData(test).labels;\n\nexport const getAllureMetaLinks = (test: Mocha.Test) => getAllureData(test).links;\n\nexport const getAllureId = (data: AllureMochaTestData) => {\n const values = data.labels.filter((l) => l.name === LabelName.ALLURE_ID).map((l) => l.value);\n if (values.length) {\n return values[0];\n }\n};\n\nexport const getAllureDisplayName = (test: Mocha.Test) => getAllureData(test).displayName;\n\nexport const getTestScope = (test: Mocha.Test) => getAllureData(test).scope;\n\nexport const setTestScope = (test: Mocha.Test, scope: string) => {\n getAllureData(test).scope = scope;\n};\n\nexport const getSuitesOfMochaTest = (test: Mocha.Test) => test.titlePath().slice(0, -1);\n\nexport const resolveParallelModeSetupFile = () =>\n join(dirname(filename), `setupAllureMochaParallel${extname(filename)}`);\n\nexport const getTestCaseId = (test: Mocha.Test) => {\n const projectName = getProjectName();\n const testFilePath = test.file ? getPosixPath(getRelativePath(test.file)) : \"\";\n const testFileId = projectName ? `${projectName}:${testFilePath}` : testFilePath;\n const suiteTitles = test.titlePath().slice(0, -1);\n return md5(JSON.stringify([testFileId, ...suiteTitles, getAllureDisplayName(test)]));\n};\n\nexport const getLegacyTestCaseId = (test: Mocha.Test) => {\n const testFilePath = test.file ? getPosixPath(getRelativePath(test.file)) : \"\";\n const suiteTitles = test.titlePath().slice(0, -1);\n return md5(JSON.stringify([testFilePath, ...suiteTitles, getAllureDisplayName(test)]));\n};\n\nexport const applyTestPlan = (plan: TestPlanIndices, rootSuite: Mocha.Suite) => {\n const suiteQueue = [];\n for (let s: Mocha.Suite | undefined = rootSuite; s; s = suiteQueue.shift()) {\n for (const test of s.tests) {\n const allureData = getAllureData(test);\n const allureId = getAllureId(allureData);\n const selected =\n !plan.hasSelection || plan.fullNameIndex.has(allureData.fullName) || (allureId && plan.idIndex.has(allureId));\n const excluded =\n plan.excludedFullNameIndex.has(allureData.fullName) || (allureId && plan.excludedIdIndex.has(allureId));\n if (!selected || excluded) {\n allureData.isIncludedInTestRun = false;\n test.pending = true;\n }\n }\n suiteQueue.push(...s.suites);\n }\n};\n\nconst hookTypeRegexp = /^\"(before|after) (all|each)\"/;\n\nexport const getHookType = (hook: Mocha.Hook): HookType => {\n if (hook.title) {\n const match = hookTypeRegexp.exec(hook.title);\n if (match) {\n return [match[1] as HookCategory, match[2] as HookScope];\n }\n }\n return [];\n};\n"],"mappings":"AAAA,SAASA,OAAO,EAAEC,OAAO,EAAEC,IAAI,QAAQ,WAAW;AAClD,SAASC,aAAa,QAAQ,UAAU;AAExC,SAASC,SAAS,QAAQ,mBAAmB;AAE7C,SAASC,yBAAyB,QAAQ,uBAAuB;AACjE,SAASC,YAAY,EAAEC,cAAc,EAAEC,eAAe,EAAEC,GAAG,EAAEC,aAAa,QAAQ,gCAAgC;AAKlH,IAAMC,QAAQ,GAAGR,aAAa,CAACS,MAAM,CAACC,IAAI,CAACC,GAAG,CAAC;AAE/C,IAAMC,kBAAkB,GAAGC,MAAM,CAAC,mDAAmD,CAAC;AAEtF,IAAMC,aAAa,GAAIC,IAAgB,IAA0B;EAC/D,IAAMC,IAAI,GAAID,IAAI,CAASH,kBAAkB,CAAC;EAE9C,IAAI,CAACI,IAAI,EAAE;IACT,IAAMN,IAAI,GAAGR,yBAAyB,CAACa,IAAI,CAACE,KAAK,CAAC;IACl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AQ,IAAIN,IAAI,CAAC3B,eAAe,CAACmC,GAAG,CAACF,QAAQ,CAAE;MACzG,IAAI,CAACC,QAAQ,IAAIE,QAAQ,EAAE;QACzBJ,UAAU,CAACpE,mBAAmB,GAAG,KAAK;QACtCO,IAAI,CAACkE,OAAO,GAAG,IAAI;MACrB;IACF;IACAR,UAAU,CAACS,IAAI,CAAC,GAAGR,CAAC,CAACS,MAAM,CAAC;EAC9B;AACF,CAAC;AAED,IAAMC,cAAc,GAAG,8BAA8B;AAErD,OAAO,IAAMC,WAAW,GAAIC,IAAgB,IAAe;EACzD,IAAIA,IAAI,CAAChF,KAAK,EAAE;IACd,IAAMiF,KAAK,GAAGH,cAAc,CAACI,IAAI,CAACF,IAAI,CAAChF,KAAK,CAAC;IAC7C,IAAIiF,KAAK,EAAE;MACT,OAAO,CAACA,KAAK,CAAC,CAAC,CAAC,EAAkBA,KAAK,CAAC,CAAC,CAAC,CAAc;IAC1D;EACF;EACA,OAAO,EAAE;AACX,CAAC","ignoreList":[]}
|
|
@@ -28,7 +28,7 @@ export declare class AllureMochaReporter extends Mocha.reporters.Base {
|
|
|
28
28
|
* @deprecated for removal. Use reporter config option instead.
|
|
29
29
|
*/
|
|
30
30
|
testAttachment: (name: string, content: Buffer | string, options: ContentType | string | AttachmentOptions) => void;
|
|
31
|
-
done(failures: number, fn?: (
|
|
31
|
+
done(failures: number, fn?: (failures: number) => void): void;
|
|
32
32
|
private applyListeners;
|
|
33
33
|
private onSuite;
|
|
34
34
|
private onSuiteEnd;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import * as Mocha from "mocha";
|
|
2
2
|
import type { ReporterEntry } from "./types.js";
|
|
3
3
|
export declare const enableExtraReporters: (runner: Mocha.Runner, options: Mocha.MochaOptions, extraReportersConfig: ReporterEntry | readonly ReporterEntry[]) => Mocha.reporters.Base[];
|
|
4
|
-
export declare const doneAll: (reporters: readonly Mocha.reporters.Base[], failures: number, fn?: (
|
|
4
|
+
export declare const doneAll: (reporters: readonly Mocha.reporters.Base[], failures: number, fn?: (failures: number) => void) => void;
|
package/dist/types/types.d.ts
CHANGED
|
@@ -4,6 +4,9 @@ import type { ReporterConstructor } from "mocha";
|
|
|
4
4
|
export type TestPlanIndices = {
|
|
5
5
|
fullNameIndex: ReadonlySet<string>;
|
|
6
6
|
idIndex: ReadonlySet<string>;
|
|
7
|
+
excludedFullNameIndex: ReadonlySet<string>;
|
|
8
|
+
excludedIdIndex: ReadonlySet<string>;
|
|
9
|
+
hasSelection: boolean;
|
|
7
10
|
};
|
|
8
11
|
export type AllureMochaTestData = {
|
|
9
12
|
isIncludedInTestRun: boolean;
|
|
@@ -22,4 +25,4 @@ export type AllureMochaReporterConfig = ReporterConfig & {
|
|
|
22
25
|
export type ReporterModuleOrCtor = ReporterConstructor | string;
|
|
23
26
|
export type ReporterOptions = Record<string, any>;
|
|
24
27
|
export type ReporterEntry = ReporterModuleOrCtor | [ReporterModuleOrCtor] | [ReporterModuleOrCtor, ReporterOptions];
|
|
25
|
-
export type ReporterDoneFn = (failures: number, fn?: (
|
|
28
|
+
export type ReporterDoneFn = (failures: number, fn?: (failures: number) => void) => void;
|
package/dist/types/utils.d.ts
CHANGED
|
@@ -13,5 +13,5 @@ export declare const getSuitesOfMochaTest: (test: Mocha.Test) => string[];
|
|
|
13
13
|
export declare const resolveParallelModeSetupFile: () => string;
|
|
14
14
|
export declare const getTestCaseId: (test: Mocha.Test) => string;
|
|
15
15
|
export declare const getLegacyTestCaseId: (test: Mocha.Test) => string;
|
|
16
|
-
export declare const applyTestPlan: (
|
|
16
|
+
export declare const applyTestPlan: (plan: TestPlanIndices, rootSuite: Mocha.Suite) => void;
|
|
17
17
|
export declare const getHookType: (hook: Mocha.Hook) => HookType;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "allure-mocha",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.16.0",
|
|
4
4
|
"description": "Allure Mocha integration",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"allure",
|
|
@@ -46,41 +46,41 @@
|
|
|
46
46
|
"allure-report": "allure serve ./out/allure-results",
|
|
47
47
|
"clean": "rimraf ./dist ./out",
|
|
48
48
|
"compile": "run-s 'compile:*'",
|
|
49
|
-
"compile:esm-babel": "babel --config-file ./babel.esm.json ./src --out-dir ./dist/esm --extensions
|
|
50
|
-
"compile:cjs-babel": "babel --config-file ./babel.cjs.json ./src --out-dir ./dist/cjs --extensions
|
|
49
|
+
"compile:esm-babel": "babel --config-file ./babel.esm.json ./src --out-dir ./dist/esm --extensions .ts --source-maps",
|
|
50
|
+
"compile:cjs-babel": "babel --config-file ./babel.cjs.json ./src --out-dir ./dist/cjs --extensions .ts --source-maps",
|
|
51
51
|
"compile:types": "tsc",
|
|
52
52
|
"compile:fixup": "node ./scripts/fixup.mjs",
|
|
53
53
|
"generate-report": "allure generate ./out/allure-results -o ./out/allure-report --clean",
|
|
54
|
-
"lint": "
|
|
55
|
-
"lint:fix": "
|
|
54
|
+
"lint": "vp lint src test",
|
|
55
|
+
"lint:fix": "vp lint --fix src test",
|
|
56
56
|
"test": "run-s --print-name 'test:*'",
|
|
57
|
-
"test:serial": "
|
|
58
|
-
"test:parallel": "ALLURE_MOCHA_TEST_PARALLEL=true
|
|
59
|
-
"test:runner": "ALLURE_MOCHA_TEST_RUNNER=cjs ALLURE_MOCHA_TEST_SPEC_FORMAT=cjs
|
|
60
|
-
"test:runner-parallel": "ALLURE_MOCHA_TEST_RUNNER=esm ALLURE_MOCHA_TEST_SPEC_FORMAT=esm ALLURE_MOCHA_TEST_PARALLEL=true
|
|
57
|
+
"test:serial": "vp test run",
|
|
58
|
+
"test:parallel": "ALLURE_MOCHA_TEST_PARALLEL=true vp test run",
|
|
59
|
+
"test:runner": "ALLURE_MOCHA_TEST_RUNNER=cjs ALLURE_MOCHA_TEST_SPEC_FORMAT=cjs vp test run",
|
|
60
|
+
"test:runner-parallel": "ALLURE_MOCHA_TEST_RUNNER=esm ALLURE_MOCHA_TEST_SPEC_FORMAT=esm ALLURE_MOCHA_TEST_PARALLEL=true vp test run"
|
|
61
61
|
},
|
|
62
62
|
"dependencies": {
|
|
63
|
-
"allure-js-commons": "3.
|
|
63
|
+
"allure-js-commons": "3.16.0"
|
|
64
64
|
},
|
|
65
65
|
"devDependencies": {
|
|
66
66
|
"@babel/cli": "^8.0.1",
|
|
67
67
|
"@babel/core": "^7.28.0",
|
|
68
68
|
"@babel/preset-env": "^7.28.0",
|
|
69
69
|
"@babel/preset-typescript": "^7.27.1",
|
|
70
|
-
"@types/babel__core": "^7.20.5",
|
|
71
|
-
"@types/babel__preset-env": "^7.10.0",
|
|
72
70
|
"@types/mocha": "^10.0.1",
|
|
73
71
|
"@types/node": "^26.0.1",
|
|
74
72
|
"allure-commandline": "^2.29.0",
|
|
75
|
-
"allure-vitest": "3.
|
|
73
|
+
"allure-vitest": "3.16.0",
|
|
76
74
|
"babel-plugin-add-module-exports": "^1.0.4",
|
|
77
75
|
"babel-plugin-transform-import-meta": "^2.3.3",
|
|
78
76
|
"glob": "^11.1.0",
|
|
79
|
-
"mocha": "^
|
|
77
|
+
"mocha": "^12.0.3",
|
|
80
78
|
"npm-run-all2": "^9.0.2",
|
|
81
79
|
"rimraf": "^6.0.0",
|
|
82
80
|
"typescript": "^6.0.3",
|
|
83
|
-
"
|
|
81
|
+
"vite": "npm:@voidzero-dev/vite-plus-core@^8.3.8000",
|
|
82
|
+
"vite-plus": "^1.7.0",
|
|
83
|
+
"vitest": "^5.1.0"
|
|
84
84
|
},
|
|
85
85
|
"peerDependencies": {
|
|
86
86
|
"mocha": ">=6.2.0"
|