allure-js-commons 3.4.4 → 3.5.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/dist/cjs/facade.js +19 -1
- package/dist/cjs/facade.js.map +1 -1
- package/dist/cjs/index.js +18 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/model.js.map +1 -1
- package/dist/cjs/sdk/index.js +6 -0
- package/dist/cjs/sdk/index.js.map +1 -1
- package/dist/cjs/sdk/reporter/ReporterRuntime.js +91 -15
- package/dist/cjs/sdk/reporter/ReporterRuntime.js.map +1 -1
- package/dist/cjs/sdk/reporter/types.js.map +1 -1
- package/dist/cjs/sdk/reporter/writer/FileSystemWriter.js +4 -0
- package/dist/cjs/sdk/reporter/writer/FileSystemWriter.js.map +1 -1
- package/dist/cjs/sdk/reporter/writer/InMemoryWriter.js +6 -0
- package/dist/cjs/sdk/reporter/writer/InMemoryWriter.js.map +1 -1
- package/dist/cjs/sdk/reporter/writer/MessageReader.js +15 -1
- package/dist/cjs/sdk/reporter/writer/MessageReader.js.map +1 -1
- package/dist/cjs/sdk/reporter/writer/MessageWriter.js +3 -0
- package/dist/cjs/sdk/reporter/writer/MessageWriter.js.map +1 -1
- package/dist/cjs/sdk/runtime/MessageTestRuntime.js +50 -11
- package/dist/cjs/sdk/runtime/MessageTestRuntime.js.map +1 -1
- package/dist/cjs/sdk/runtime/NoopTestRuntime.js +31 -13
- package/dist/cjs/sdk/runtime/NoopTestRuntime.js.map +1 -1
- package/dist/cjs/sdk/runtime/types.js.map +1 -1
- package/dist/cjs/sdk/types.js.map +1 -1
- package/dist/cjs/sdk/utils.js +9 -1
- package/dist/cjs/sdk/utils.js.map +1 -1
- package/dist/esm/facade.js +15 -0
- package/dist/esm/facade.js.map +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/model.js.map +1 -1
- package/dist/esm/sdk/index.js +1 -1
- package/dist/esm/sdk/index.js.map +1 -1
- package/dist/esm/sdk/reporter/ReporterRuntime.js +91 -15
- package/dist/esm/sdk/reporter/ReporterRuntime.js.map +1 -1
- package/dist/esm/sdk/reporter/types.js.map +1 -1
- package/dist/esm/sdk/reporter/writer/FileSystemWriter.js +4 -0
- package/dist/esm/sdk/reporter/writer/FileSystemWriter.js.map +1 -1
- package/dist/esm/sdk/reporter/writer/InMemoryWriter.js +6 -0
- package/dist/esm/sdk/reporter/writer/InMemoryWriter.js.map +1 -1
- package/dist/esm/sdk/reporter/writer/MessageReader.js +15 -1
- package/dist/esm/sdk/reporter/writer/MessageReader.js.map +1 -1
- package/dist/esm/sdk/reporter/writer/MessageWriter.js +3 -0
- package/dist/esm/sdk/reporter/writer/MessageWriter.js.map +1 -1
- package/dist/esm/sdk/runtime/MessageTestRuntime.js +50 -11
- package/dist/esm/sdk/runtime/MessageTestRuntime.js.map +1 -1
- package/dist/esm/sdk/runtime/NoopTestRuntime.js +31 -13
- package/dist/esm/sdk/runtime/NoopTestRuntime.js.map +1 -1
- package/dist/esm/sdk/runtime/types.js.map +1 -1
- package/dist/esm/sdk/types.js.map +1 -1
- package/dist/esm/sdk/utils.js +7 -0
- package/dist/esm/sdk/utils.js.map +1 -1
- package/dist/types/facade.d.ts +4 -1
- package/dist/types/index.d.ts +2 -2
- package/dist/types/model.d.ts +10 -0
- package/dist/types/sdk/index.d.ts +2 -2
- package/dist/types/sdk/reporter/ReporterRuntime.d.ts +1 -0
- package/dist/types/sdk/reporter/types.d.ts +2 -1
- package/dist/types/sdk/reporter/writer/FileSystemWriter.d.ts +2 -1
- package/dist/types/sdk/reporter/writer/InMemoryWriter.d.ts +3 -1
- package/dist/types/sdk/reporter/writer/MessageWriter.d.ts +2 -1
- package/dist/types/sdk/runtime/MessageTestRuntime.d.ts +4 -1
- package/dist/types/sdk/runtime/NoopTestRuntime.d.ts +3 -0
- package/dist/types/sdk/runtime/types.d.ts +4 -1
- package/dist/types/sdk/types.d.ts +23 -2
- package/dist/types/sdk/utils.d.ts +2 -1
- package/package.json +2 -2
package/dist/esm/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { allureId, attachment, attachmentPath, attachTrace, description, descriptionHtml, displayName, epic, feature, historyId, issue, label, labels, layer, link, links, logStep, owner, parameter, parentSuite, severity, step, story, subSuite, suite, tag, tags, testCaseId, tms } from "./facade.js";
|
|
1
|
+
export { allureId, attachment, attachmentPath, attachTrace, description, descriptionHtml, displayName, epic, feature, globalAttachment, globalAttachmentPath, globalError, historyId, issue, label, labels, layer, link, links, logStep, owner, parameter, parentSuite, severity, step, story, subSuite, suite, tag, tags, testCaseId, tms } from "./facade.js";
|
|
2
2
|
export { ContentType, LinkType, LabelName, Severity, Stage, Status, StatusByPriority } from "./model.js";
|
|
3
3
|
//# sourceMappingURL=index.js.map
|
package/dist/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["allureId","attachment","attachmentPath","attachTrace","description","descriptionHtml","displayName","epic","feature","historyId","issue","label","labels","layer","link","links","logStep","owner","parameter","parentSuite","severity","step","story","subSuite","suite","tag","tags","testCaseId","tms","ContentType","LinkType","LabelName","Severity","Stage","Status","StatusByPriority"],"sources":["../../src/index.ts"],"sourcesContent":["export {\n allureId,\n attachment,\n attachmentPath,\n attachTrace,\n description,\n descriptionHtml,\n displayName,\n epic,\n feature,\n historyId,\n issue,\n label,\n labels,\n layer,\n link,\n links,\n logStep,\n owner,\n parameter,\n parentSuite,\n severity,\n step,\n story,\n subSuite,\n suite,\n tag,\n tags,\n testCaseId,\n tms,\n} from \"./facade.js\";\nexport type { StepContext } from \"./facade.js\";\nexport type {\n Attachment,\n AttachmentOptions,\n FixtureResult,\n ImageDiffAttachment,\n Label,\n Link,\n Parameter,\n ParameterMode,\n ParameterOptions,\n StatusDetails,\n StepResult,\n TestOrStepResult,\n TestResult,\n TestResultContainer,\n} from \"./model.js\";\nexport { ContentType, LinkType, LabelName, Severity, Stage, Status, StatusByPriority } from \"./model.js\";\n"],"mappings":"AAAA,SACEA,QAAQ,EACRC,UAAU,EACVC,cAAc,EACdC,WAAW,EACXC,WAAW,EACXC,eAAe,EACfC,WAAW,EACXC,IAAI,EACJC,OAAO,EACPC,SAAS,EACTC,KAAK,EACLC,KAAK,EACLC,MAAM,EACNC,KAAK,EACLC,IAAI,EACJC,KAAK,EACLC,OAAO,EACPC,KAAK,EACLC,SAAS,EACTC,WAAW,EACXC,QAAQ,EACRC,IAAI,EACJC,KAAK,EACLC,QAAQ,EACRC,KAAK,EACLC,GAAG,EACHC,IAAI,EACJC,UAAU,EACVC,GAAG,QACE,aAAa;
|
|
1
|
+
{"version":3,"file":"index.js","names":["allureId","attachment","attachmentPath","attachTrace","description","descriptionHtml","displayName","epic","feature","globalAttachment","globalAttachmentPath","globalError","historyId","issue","label","labels","layer","link","links","logStep","owner","parameter","parentSuite","severity","step","story","subSuite","suite","tag","tags","testCaseId","tms","ContentType","LinkType","LabelName","Severity","Stage","Status","StatusByPriority"],"sources":["../../src/index.ts"],"sourcesContent":["export {\n allureId,\n attachment,\n attachmentPath,\n attachTrace,\n description,\n descriptionHtml,\n displayName,\n epic,\n feature,\n globalAttachment,\n globalAttachmentPath,\n globalError,\n historyId,\n issue,\n label,\n labels,\n layer,\n link,\n links,\n logStep,\n owner,\n parameter,\n parentSuite,\n severity,\n step,\n story,\n subSuite,\n suite,\n tag,\n tags,\n testCaseId,\n tms,\n} from \"./facade.js\";\nexport type { StepContext } from \"./facade.js\";\nexport type {\n Attachment,\n AttachmentOptions,\n FixtureResult,\n ImageDiffAttachment,\n Label,\n Link,\n Globals,\n Parameter,\n ParameterMode,\n ParameterOptions,\n StatusDetails,\n StepResult,\n TestOrStepResult,\n TestResult,\n TestResultContainer,\n} from \"./model.js\";\nexport { ContentType, LinkType, LabelName, Severity, Stage, Status, StatusByPriority } from \"./model.js\";\n"],"mappings":"AAAA,SACEA,QAAQ,EACRC,UAAU,EACVC,cAAc,EACdC,WAAW,EACXC,WAAW,EACXC,eAAe,EACfC,WAAW,EACXC,IAAI,EACJC,OAAO,EACPC,gBAAgB,EAChBC,oBAAoB,EACpBC,WAAW,EACXC,SAAS,EACTC,KAAK,EACLC,KAAK,EACLC,MAAM,EACNC,KAAK,EACLC,IAAI,EACJC,KAAK,EACLC,OAAO,EACPC,KAAK,EACLC,SAAS,EACTC,WAAW,EACXC,QAAQ,EACRC,IAAI,EACJC,KAAK,EACLC,QAAQ,EACRC,KAAK,EACLC,GAAG,EACHC,IAAI,EACJC,UAAU,EACVC,GAAG,QACE,aAAa;AAmBpB,SAASC,WAAW,EAAEC,QAAQ,EAAEC,SAAS,EAAEC,QAAQ,EAAEC,KAAK,EAAEC,MAAM,EAAEC,gBAAgB,QAAQ,YAAY","ignoreList":[]}
|
package/dist/esm/model.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"model.js","names":["Status","StatusByPriority","FAILED","BROKEN","PASSED","SKIPPED","Stage","LabelName","Severity","ContentType","LinkType"],"sources":["../../src/model.ts"],"sourcesContent":["export interface Attachment {\n name: string;\n type?: string;\n source: string;\n size?: number;\n}\n\nexport interface AttachmentOptions {\n contentType: ContentType | string;\n encoding?: BufferEncoding;\n fileExtension?: string;\n path?: string;\n body?: Buffer;\n}\n\nexport interface Label {\n name: LabelName | string;\n value: string;\n}\n\nexport interface Link {\n name?: string;\n url: string;\n type?: LinkType | string;\n}\n\nexport type ParameterMode = \"hidden\" | \"masked\" | \"default\";\n\nexport interface Parameter {\n name: string;\n value: string;\n excluded?: boolean;\n mode?: ParameterMode;\n}\n\nexport type ParameterOptions = Pick<Parameter, \"mode\" | \"excluded\">;\n\nexport interface StatusDetails {\n message?: string;\n trace?: string;\n actual?: string;\n expected?: string;\n}\n\n// don't use the interface as is, use Results types instead\ninterface Executable {\n name?: string;\n status?: Status;\n statusDetails: StatusDetails;\n stage: Stage;\n description?: string;\n descriptionHtml?: string;\n steps: StepResult[];\n attachments: Attachment[];\n parameters: Parameter[];\n start?: number;\n stop?: number;\n}\n\nexport interface FixtureResult extends Executable {}\n\nexport interface StepResult extends Executable {\n uuid?: string;\n}\n\nexport interface TestResult extends Executable {\n uuid: string;\n historyId?: string;\n fullName?: string;\n testCaseId?: string;\n titlePath?: string[];\n labels: Label[];\n links: Link[];\n}\n\nexport interface TestResultContainer {\n uuid: string;\n name?: string;\n children: string[];\n befores: FixtureResult[];\n afters: FixtureResult[];\n}\n\nexport type TestOrStepResult = StepResult | TestResult;\n\n/* eslint-disable no-shadow */\nexport enum Status {\n FAILED = \"failed\",\n BROKEN = \"broken\",\n PASSED = \"passed\",\n SKIPPED = \"skipped\",\n}\n\nexport const StatusByPriority = [Status.FAILED, Status.BROKEN, Status.PASSED, Status.SKIPPED];\n\n/* eslint-disable no-shadow */\nexport enum Stage {\n SCHEDULED = \"scheduled\",\n RUNNING = \"running\",\n FINISHED = \"finished\",\n PENDING = \"pending\",\n INTERRUPTED = \"interrupted\",\n}\n\n/* eslint-disable no-shadow */\nexport enum LabelName {\n ALLURE_ID = \"ALLURE_ID\",\n /**\n * @deprecated please use ALLURE_ID instead\n */\n AS_ID = ALLURE_ID,\n SUITE = \"suite\",\n PARENT_SUITE = \"parentSuite\",\n SUB_SUITE = \"subSuite\",\n EPIC = \"epic\",\n FEATURE = \"feature\",\n STORY = \"story\",\n SEVERITY = \"severity\",\n TAG = \"tag\",\n OWNER = \"owner\",\n LEAD = \"lead\",\n HOST = \"host\",\n THREAD = \"thread\",\n TEST_METHOD = \"testMethod\",\n TEST_CLASS = \"testClass\",\n PACKAGE = \"package\",\n FRAMEWORK = \"framework\",\n LANGUAGE = \"language\",\n LAYER = \"layer\",\n}\n\n/* eslint-disable no-shadow */\nexport enum Severity {\n BLOCKER = \"blocker\",\n CRITICAL = \"critical\",\n NORMAL = \"normal\",\n MINOR = \"minor\",\n TRIVIAL = \"trivial\",\n}\n\n/* eslint-disable no-shadow */\nexport enum ContentType {\n TEXT = \"text/plain\",\n XML = \"application/xml\",\n HTML = \"text/html\",\n CSV = \"text/csv\",\n TSV = \"text/tab-separated-values\",\n CSS = \"text/css\",\n URI = \"text/uri-list\",\n SVG = \"image/svg+xml\",\n PNG = \"image/png\",\n JSON = \"application/json\",\n ZIP = \"application/zip\",\n WEBM = \"video/webm\",\n JPEG = \"image/jpeg\",\n MP4 = \"video/mp4\",\n IMAGEDIFF = \"application/vnd.allure.image.diff\",\n}\n\n/* eslint-disable no-shadow */\nexport enum LinkType {\n DEFAULT = \"link\",\n ISSUE = \"issue\",\n TMS = \"tms\",\n}\n\nexport interface ImageDiffAttachment {\n expected: string | undefined; // data:image;base64,\n actual: string | undefined; // data:image;base64,\n diff: string | undefined; // data:image;base64,\n name: string;\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"model.js","names":["Status","StatusByPriority","FAILED","BROKEN","PASSED","SKIPPED","Stage","LabelName","Severity","ContentType","LinkType"],"sources":["../../src/model.ts"],"sourcesContent":["export interface Attachment {\n name: string;\n type?: string;\n source: string;\n size?: number;\n}\n\nexport interface AttachmentOptions {\n contentType: ContentType | string;\n encoding?: BufferEncoding;\n fileExtension?: string;\n path?: string;\n body?: Buffer;\n}\n\nexport interface Label {\n name: LabelName | string;\n value: string;\n}\n\nexport interface Link {\n name?: string;\n url: string;\n type?: LinkType | string;\n}\n\nexport type ParameterMode = \"hidden\" | \"masked\" | \"default\";\n\nexport interface Parameter {\n name: string;\n value: string;\n excluded?: boolean;\n mode?: ParameterMode;\n}\n\nexport type ParameterOptions = Pick<Parameter, \"mode\" | \"excluded\">;\n\nexport interface StatusDetails {\n message?: string;\n trace?: string;\n actual?: string;\n expected?: string;\n}\n\nexport interface GlobalAttachment extends Attachment {\n timestamp: number;\n}\n\nexport interface GlobalError extends StatusDetails {\n timestamp: number;\n}\n\nexport interface Globals {\n attachments: GlobalAttachment[];\n errors: GlobalError[];\n}\n\n// don't use the interface as is, use Results types instead\ninterface Executable {\n name?: string;\n status?: Status;\n statusDetails: StatusDetails;\n stage: Stage;\n description?: string;\n descriptionHtml?: string;\n steps: StepResult[];\n attachments: Attachment[];\n parameters: Parameter[];\n start?: number;\n stop?: number;\n}\n\nexport interface FixtureResult extends Executable {}\n\nexport interface StepResult extends Executable {\n uuid?: string;\n}\n\nexport interface TestResult extends Executable {\n uuid: string;\n historyId?: string;\n fullName?: string;\n testCaseId?: string;\n titlePath?: string[];\n labels: Label[];\n links: Link[];\n}\n\nexport interface TestResultContainer {\n uuid: string;\n name?: string;\n children: string[];\n befores: FixtureResult[];\n afters: FixtureResult[];\n}\n\nexport type TestOrStepResult = StepResult | TestResult;\n\n/* eslint-disable no-shadow */\nexport enum Status {\n FAILED = \"failed\",\n BROKEN = \"broken\",\n PASSED = \"passed\",\n SKIPPED = \"skipped\",\n}\n\nexport const StatusByPriority = [Status.FAILED, Status.BROKEN, Status.PASSED, Status.SKIPPED];\n\n/* eslint-disable no-shadow */\nexport enum Stage {\n SCHEDULED = \"scheduled\",\n RUNNING = \"running\",\n FINISHED = \"finished\",\n PENDING = \"pending\",\n INTERRUPTED = \"interrupted\",\n}\n\n/* eslint-disable no-shadow */\nexport enum LabelName {\n ALLURE_ID = \"ALLURE_ID\",\n /**\n * @deprecated please use ALLURE_ID instead\n */\n AS_ID = ALLURE_ID,\n SUITE = \"suite\",\n PARENT_SUITE = \"parentSuite\",\n SUB_SUITE = \"subSuite\",\n EPIC = \"epic\",\n FEATURE = \"feature\",\n STORY = \"story\",\n SEVERITY = \"severity\",\n TAG = \"tag\",\n OWNER = \"owner\",\n LEAD = \"lead\",\n HOST = \"host\",\n THREAD = \"thread\",\n TEST_METHOD = \"testMethod\",\n TEST_CLASS = \"testClass\",\n PACKAGE = \"package\",\n FRAMEWORK = \"framework\",\n LANGUAGE = \"language\",\n LAYER = \"layer\",\n}\n\n/* eslint-disable no-shadow */\nexport enum Severity {\n BLOCKER = \"blocker\",\n CRITICAL = \"critical\",\n NORMAL = \"normal\",\n MINOR = \"minor\",\n TRIVIAL = \"trivial\",\n}\n\n/* eslint-disable no-shadow */\nexport enum ContentType {\n TEXT = \"text/plain\",\n XML = \"application/xml\",\n HTML = \"text/html\",\n CSV = \"text/csv\",\n TSV = \"text/tab-separated-values\",\n CSS = \"text/css\",\n URI = \"text/uri-list\",\n SVG = \"image/svg+xml\",\n PNG = \"image/png\",\n JSON = \"application/json\",\n ZIP = \"application/zip\",\n WEBM = \"video/webm\",\n JPEG = \"image/jpeg\",\n MP4 = \"video/mp4\",\n IMAGEDIFF = \"application/vnd.allure.image.diff\",\n}\n\n/* eslint-disable no-shadow */\nexport enum LinkType {\n DEFAULT = \"link\",\n ISSUE = \"issue\",\n TMS = \"tms\",\n}\n\nexport interface ImageDiffAttachment {\n expected: string | undefined; // data:image;base64,\n actual: string | undefined; // data:image;base64,\n diff: string | undefined; // data:image;base64,\n name: string;\n}\n"],"mappings":"AAyDA;;AAyCA;AACA,WAAYA,MAAM,0BAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAAA,OAANA,MAAM;AAAA;AAOlB,OAAO,IAAMC,gBAAgB,GAAG,CAACD,MAAM,CAACE,MAAM,EAAEF,MAAM,CAACG,MAAM,EAAEH,MAAM,CAACI,MAAM,EAAEJ,MAAM,CAACK,OAAO,CAAC;;AAE7F;AACA,WAAYC,KAAK,0BAALA,KAAK;EAALA,KAAK;EAALA,KAAK;EAALA,KAAK;EAALA,KAAK;EAALA,KAAK;EAAA,OAALA,KAAK;AAAA;;AAQjB;AACA,WAAYC,SAAS,0BAATA,SAAS;EAATA,SAAS;EAEnB;AACF;AACA;EAJYA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAAA,OAATA,SAAS;AAAA;;AA0BrB;AACA,WAAYC,QAAQ,0BAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAAA,OAARA,QAAQ;AAAA;;AAQpB;AACA,WAAYC,WAAW,0BAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAA,OAAXA,WAAW;AAAA;;AAkBvB;AACA,WAAYC,QAAQ,0BAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAAA,OAARA,QAAQ;AAAA","ignoreList":[]}
|
package/dist/esm/sdk/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { getStatusFromError, getMessageAndTraceFromError, isMetadataTag, getMetadataLabel, extractMetadataFromString, isAllStepsEnded, isAnyStepFailed, getUnfinishedStepsMessages, hasStepMessage, isPromise, hasLabel, stripAnsi, serialize } from "./utils.js";
|
|
1
|
+
export { getStatusFromError, getMessageAndTraceFromError, isMetadataTag, getMetadataLabel, extractMetadataFromString, isAllStepsEnded, isAnyStepFailed, getUnfinishedStepsMessages, hasStepMessage, isGlobalRuntimeMessage, isPromise, hasLabel, stripAnsi, serialize } from "./utils.js";
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["getStatusFromError","getMessageAndTraceFromError","isMetadataTag","getMetadataLabel","extractMetadataFromString","isAllStepsEnded","isAnyStepFailed","getUnfinishedStepsMessages","hasStepMessage","isPromise","hasLabel","stripAnsi","serialize"],"sources":["../../../src/sdk/index.ts"],"sourcesContent":["export type {\n AllureResults,\n Category,\n EnvironmentInfo,\n ExecutorInfo,\n RuntimeMessage,\n RuntimeMetadataMessage,\n RuntimeAttachmentContentMessage,\n RuntimeAttachmentPathMessage,\n RuntimeStartStepMessage,\n RuntimeStepMetadataMessage,\n RuntimeStopStepMessage,\n TestPlanV1Test,\n TestPlanV1,\n} from \"./types.js\";\nexport {\n getStatusFromError,\n getMessageAndTraceFromError,\n isMetadataTag,\n getMetadataLabel,\n extractMetadataFromString,\n isAllStepsEnded,\n isAnyStepFailed,\n getUnfinishedStepsMessages,\n hasStepMessage,\n isPromise,\n hasLabel,\n stripAnsi,\n serialize,\n} from \"./utils.js\";\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","names":["getStatusFromError","getMessageAndTraceFromError","isMetadataTag","getMetadataLabel","extractMetadataFromString","isAllStepsEnded","isAnyStepFailed","getUnfinishedStepsMessages","hasStepMessage","isGlobalRuntimeMessage","isPromise","hasLabel","stripAnsi","serialize"],"sources":["../../../src/sdk/index.ts"],"sourcesContent":["export type {\n AllureResults,\n Category,\n EnvironmentInfo,\n ExecutorInfo,\n RuntimeMessage,\n RuntimeMetadataMessage,\n RuntimeAttachmentContentMessage,\n RuntimeAttachmentPathMessage,\n RuntimeGlobalAttachmentContentMessage,\n RuntimeGlobalAttachmentPathMessage,\n RuntimeGlobalErrorMessage,\n RuntimeStartStepMessage,\n RuntimeStepMetadataMessage,\n RuntimeStopStepMessage,\n TestPlanV1Test,\n TestPlanV1,\n} from \"./types.js\";\nexport {\n getStatusFromError,\n getMessageAndTraceFromError,\n isMetadataTag,\n getMetadataLabel,\n extractMetadataFromString,\n isAllStepsEnded,\n isAnyStepFailed,\n getUnfinishedStepsMessages,\n hasStepMessage,\n isGlobalRuntimeMessage,\n isPromise,\n hasLabel,\n stripAnsi,\n serialize,\n} from \"./utils.js\";\n"],"mappings":"AAkBA,SACEA,kBAAkB,EAClBC,2BAA2B,EAC3BC,aAAa,EACbC,gBAAgB,EAChBC,yBAAyB,EACzBC,eAAe,EACfC,eAAe,EACfC,0BAA0B,EAC1BC,cAAc,EACdC,sBAAsB,EACtBC,SAAS,EACTC,QAAQ,EACRC,SAAS,EACTC,SAAS,QACJ,YAAY","ignoreList":[]}
|
|
@@ -161,7 +161,14 @@ var _handleStartStepMessage = /*#__PURE__*/new WeakMap();
|
|
|
161
161
|
var _handleStopStepMessage = /*#__PURE__*/new WeakMap();
|
|
162
162
|
var _handleAttachmentContentMessage = /*#__PURE__*/new WeakMap();
|
|
163
163
|
var _handleAttachmentPathMessage = /*#__PURE__*/new WeakMap();
|
|
164
|
+
var _handleGlobalAttachmentContentMessage = /*#__PURE__*/new WeakMap();
|
|
165
|
+
var _handleGlobalAttachmentPathMessage = /*#__PURE__*/new WeakMap();
|
|
166
|
+
var _handleGlobalErrorMessage = /*#__PURE__*/new WeakMap();
|
|
164
167
|
var _findParent = /*#__PURE__*/new WeakMap();
|
|
168
|
+
var _writeAttachmentFile = /*#__PURE__*/new WeakMap();
|
|
169
|
+
var _createAttachment = /*#__PURE__*/new WeakMap();
|
|
170
|
+
var _createGlobalAttachment = /*#__PURE__*/new WeakMap();
|
|
171
|
+
var _writeGlobals = /*#__PURE__*/new WeakMap();
|
|
165
172
|
var _writeFixturesOfScope = /*#__PURE__*/new WeakMap();
|
|
166
173
|
var _writeContainer = /*#__PURE__*/new WeakMap();
|
|
167
174
|
var _calculateTimings = /*#__PURE__*/new WeakMap();
|
|
@@ -381,21 +388,10 @@ export class ReporterRuntime {
|
|
|
381
388
|
return;
|
|
382
389
|
}
|
|
383
390
|
var isPath = typeof attachmentContentOrPath === "string";
|
|
384
|
-
var
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
});
|
|
389
|
-
if (isPath) {
|
|
390
|
-
this.writer.writeAttachmentFromPath(attachmentFileName, attachmentContentOrPath);
|
|
391
|
-
} else {
|
|
392
|
-
this.writer.writeAttachment(attachmentFileName, attachmentContentOrPath);
|
|
393
|
-
}
|
|
394
|
-
var attachment = {
|
|
395
|
-
name: attachmentName,
|
|
396
|
-
source: attachmentFileName,
|
|
397
|
-
type: options.contentType
|
|
398
|
-
};
|
|
391
|
+
var attachmentFileName = _classPrivateFieldGet(_writeAttachmentFile, this).call(this, attachmentContentOrPath, _objectSpread(_objectSpread({}, options), {}, {
|
|
392
|
+
fileExtension: (_options$fileExtensio = options.fileExtension) !== null && _options$fileExtensio !== void 0 ? _options$fileExtensio : isPath ? extname(attachmentContentOrPath) : undefined
|
|
393
|
+
}));
|
|
394
|
+
var attachment = _classPrivateFieldGet(_createAttachment, this).call(this, attachmentName, options.contentType, attachmentFileName);
|
|
399
395
|
if (options.wrapInStep) {
|
|
400
396
|
var {
|
|
401
397
|
timestamp = Date.now()
|
|
@@ -452,6 +448,15 @@ export class ReporterRuntime {
|
|
|
452
448
|
case "attachment_path":
|
|
453
449
|
_classPrivateFieldGet(_handleAttachmentPathMessage, this).call(this, rootUuid, message.data);
|
|
454
450
|
return;
|
|
451
|
+
case "global_attachment_content":
|
|
452
|
+
_classPrivateFieldGet(_handleGlobalAttachmentContentMessage, this).call(this, message.data);
|
|
453
|
+
return;
|
|
454
|
+
case "global_attachment_path":
|
|
455
|
+
_classPrivateFieldGet(_handleGlobalAttachmentPathMessage, this).call(this, message.data);
|
|
456
|
+
return;
|
|
457
|
+
case "global_error":
|
|
458
|
+
_classPrivateFieldGet(_handleGlobalErrorMessage, this).call(this, message.data);
|
|
459
|
+
return;
|
|
455
460
|
default:
|
|
456
461
|
// eslint-disable-next-line no-console
|
|
457
462
|
console.error("could not apply runtime messages: unknown message ".concat(JSON.stringify(message)));
|
|
@@ -459,6 +464,23 @@ export class ReporterRuntime {
|
|
|
459
464
|
}
|
|
460
465
|
});
|
|
461
466
|
});
|
|
467
|
+
_defineProperty(this, "applyGlobalRuntimeMessages", messages => {
|
|
468
|
+
messages.forEach(message => {
|
|
469
|
+
switch (message.type) {
|
|
470
|
+
case "global_attachment_content":
|
|
471
|
+
_classPrivateFieldGet(_handleGlobalAttachmentContentMessage, this).call(this, message.data);
|
|
472
|
+
break;
|
|
473
|
+
case "global_attachment_path":
|
|
474
|
+
_classPrivateFieldGet(_handleGlobalAttachmentPathMessage, this).call(this, message.data);
|
|
475
|
+
break;
|
|
476
|
+
case "global_error":
|
|
477
|
+
_classPrivateFieldGet(_handleGlobalErrorMessage, this).call(this, message.data);
|
|
478
|
+
break;
|
|
479
|
+
default:
|
|
480
|
+
break;
|
|
481
|
+
}
|
|
482
|
+
});
|
|
483
|
+
});
|
|
462
484
|
_classPrivateFieldInitSpec(this, _handleMetadataMessage, (rootUuid, message) => {
|
|
463
485
|
// only display name could be set to fixture.
|
|
464
486
|
var fixtureResult = this.state.getWrappedFixtureResult(rootUuid);
|
|
@@ -601,6 +623,36 @@ export class ReporterRuntime {
|
|
|
601
623
|
timestamp: message.timestamp
|
|
602
624
|
});
|
|
603
625
|
});
|
|
626
|
+
_classPrivateFieldInitSpec(this, _handleGlobalAttachmentContentMessage, message => {
|
|
627
|
+
var attachmentContent = Buffer.from(message.content, message.encoding);
|
|
628
|
+
var attachmentSource = _classPrivateFieldGet(_writeAttachmentFile, this).call(this, attachmentContent, {
|
|
629
|
+
contentType: message.contentType,
|
|
630
|
+
fileExtension: message.fileExtension
|
|
631
|
+
});
|
|
632
|
+
_classPrivateFieldGet(_writeGlobals, this).call(this, {
|
|
633
|
+
attachments: [_classPrivateFieldGet(_createGlobalAttachment, this).call(this, message.name, message.contentType, attachmentSource)],
|
|
634
|
+
errors: []
|
|
635
|
+
});
|
|
636
|
+
});
|
|
637
|
+
_classPrivateFieldInitSpec(this, _handleGlobalAttachmentPathMessage, message => {
|
|
638
|
+
var _message$fileExtensio;
|
|
639
|
+
var attachmentSource = _classPrivateFieldGet(_writeAttachmentFile, this).call(this, message.path, {
|
|
640
|
+
contentType: message.contentType,
|
|
641
|
+
fileExtension: (_message$fileExtensio = message.fileExtension) !== null && _message$fileExtensio !== void 0 ? _message$fileExtensio : extname(message.path)
|
|
642
|
+
});
|
|
643
|
+
_classPrivateFieldGet(_writeGlobals, this).call(this, {
|
|
644
|
+
attachments: [_classPrivateFieldGet(_createGlobalAttachment, this).call(this, message.name, message.contentType, attachmentSource)],
|
|
645
|
+
errors: []
|
|
646
|
+
});
|
|
647
|
+
});
|
|
648
|
+
_classPrivateFieldInitSpec(this, _handleGlobalErrorMessage, message => {
|
|
649
|
+
_classPrivateFieldGet(_writeGlobals, this).call(this, {
|
|
650
|
+
attachments: [],
|
|
651
|
+
errors: [_objectSpread(_objectSpread({}, message), {}, {
|
|
652
|
+
timestamp: Date.now()
|
|
653
|
+
})]
|
|
654
|
+
});
|
|
655
|
+
});
|
|
604
656
|
_classPrivateFieldInitSpec(this, _findParent, (rootUuid, parentStepUuid) => {
|
|
605
657
|
var root = this.state.getExecutionItem(rootUuid);
|
|
606
658
|
if (!root) {
|
|
@@ -615,6 +667,30 @@ export class ReporterRuntime {
|
|
|
615
667
|
return this.state.getStepResult(parentStepUuid);
|
|
616
668
|
}
|
|
617
669
|
});
|
|
670
|
+
_classPrivateFieldInitSpec(this, _writeAttachmentFile, (attachmentContentOrPath, options) => {
|
|
671
|
+
var isPath = typeof attachmentContentOrPath === "string";
|
|
672
|
+
var attachmentFileName = buildAttachmentFileName({
|
|
673
|
+
contentType: options.contentType,
|
|
674
|
+
fileExtension: options.fileExtension
|
|
675
|
+
});
|
|
676
|
+
if (isPath) {
|
|
677
|
+
this.writer.writeAttachmentFromPath(attachmentFileName, attachmentContentOrPath);
|
|
678
|
+
} else {
|
|
679
|
+
this.writer.writeAttachment(attachmentFileName, attachmentContentOrPath);
|
|
680
|
+
}
|
|
681
|
+
return attachmentFileName;
|
|
682
|
+
});
|
|
683
|
+
_classPrivateFieldInitSpec(this, _createAttachment, (name, contentType, source) => ({
|
|
684
|
+
name,
|
|
685
|
+
source,
|
|
686
|
+
type: contentType
|
|
687
|
+
}));
|
|
688
|
+
_classPrivateFieldInitSpec(this, _createGlobalAttachment, (name, contentType, source) => _objectSpread(_objectSpread({}, _classPrivateFieldGet(_createAttachment, this).call(this, name, contentType, source)), {}, {
|
|
689
|
+
timestamp: Date.now()
|
|
690
|
+
}));
|
|
691
|
+
_classPrivateFieldInitSpec(this, _writeGlobals, globals => {
|
|
692
|
+
this.writer.writeGlobals("".concat(randomUuid(), "-globals.json"), globals);
|
|
693
|
+
});
|
|
618
694
|
_classPrivateFieldInitSpec(this, _writeFixturesOfScope, _ref2 => {
|
|
619
695
|
var {
|
|
620
696
|
fixtures,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReporterRuntime.js","names":["path","extname","Stage","LifecycleState","Notifier","createFixtureResult","createStepResult","createTestResult","hasSkipLabel","deepClone","formatLinks","getTestResultHistoryId","getTestResultTestCaseId","randomUuid","buildAttachmentFileName","resolveWriter","_runningSteps","WeakMap","_ShallowStepsStack_brand","WeakSet","ShallowStepsStack","constructor","_classPrivateMethodInitSpec","_defineProperty","_classPrivateFieldInitSpec","currentStep","_classPrivateGetter","_get_currentStep","startStep","step","stepResult","_objectSpread","steps","push","_classPrivateFieldGet","updateStep","updateFunc","console","error","stopStep","opts","stop","duration","result","start","undefined","pop","findStepByUuid","uuid","findRecursively","s","found","addAttachment","attachment","writer","isPath","fileExt","fileName","contentType","fileExtension","writeAttachmentFromPath","body","writeAttachment","_this","length","DefaultStepStack","Map","stepsByRoot","clear","rootsByStep","rootUuid","maybeValue","get","delete","forEach","stepUuid","set","removeStep","newValue","filter","value","_handleMetadataMessage","_handleStepMetadataMessage","_handleStartStepMessage","_handleStopStepMessage","_handleAttachmentContentMessage","_handleAttachmentPathMessage","_findParent","_writeFixturesOfScope","_writeContainer","_calculateTimings","ReporterRuntime","_ref","_this2","listeners","environmentInfo","categories","links","globalLabels","state","setScope","scope","getScope","concat","call","deleteScope","scopeUuid","type","fixtureResult","wrappedFixture","setFixtureResult","Date","now","fixtures","fixture","getFixtureResult","startStop","stage","FINISHED","scopeUuids","arguments","testResult","notifier","beforeTestResultStart","tests","setTestResult","afterTestResultStart","getTestResult","beforeTestResultUpdate","afterTestResultUpdate","_testResult$testCaseI","_testResult$historyId","wrapped","getWrappedTestResult","beforeTestResultStop","labels","parameters","description","_testResult$descripti","descriptionHtml","_testResult$descripti2","testCaseId","historyId","afterTestResultStop","deleteTestResult","beforeTestResultWrite","writeResult","afterTestResultWrite","stepStack","parentStepUuid","parent","JSON","stringify","setStepResult","addStep","getStepResult","beforeStepStop","afterStepStop","attachmentName","attachmentContentOrPath","options","_options$fileExtensio","attachmentFileName","name","source","wrapInStep","timestamp","attachments","writeEnvironmentInfo","serializedCategories","map","c","messageRegex","RegExp","traceRegex","writeCategoriesDefinitions","messages","message","data","getWrappedFixtureResult","displayName","updateFixture","updateScope","linkConfig","updateTest","status","statusDetails","Buffer","from","content","encoding","root","getExecutionItem","_ref2","writtenFixtures","Set","has","deleteFixtureResult","add","befores","afters","writeGroup","children","normalisedDuration","Math","max","round","Array","isArray","Object","keys","entries","flatMap","_ref3","v"],"sources":["../../../../src/sdk/reporter/ReporterRuntime.ts"],"sourcesContent":["/* eslint max-lines: 0 */\nimport path from \"node:path\";\nimport { extname } from \"path\";\nimport {\n type Attachment,\n type AttachmentOptions,\n type FixtureResult,\n type Label,\n Stage,\n type StepResult,\n type TestResult,\n} from \"../../model.js\";\nimport type {\n Category,\n EnvironmentInfo,\n RuntimeAttachmentContentMessage,\n RuntimeAttachmentPathMessage,\n RuntimeMessage,\n RuntimeMetadataMessage,\n RuntimeStartStepMessage,\n RuntimeStepMetadataMessage,\n RuntimeStopStepMessage,\n} from \"../types.js\";\nimport { LifecycleState } from \"./LifecycleState.js\";\nimport { Notifier } from \"./Notifier.js\";\nimport { createFixtureResult, createStepResult, createTestResult } from \"./factory.js\";\nimport { hasSkipLabel } from \"./testplan.js\";\nimport type {\n FixtureResultWrapper,\n FixtureType,\n LinkConfig,\n ReporterRuntimeConfig,\n TestScope,\n Writer,\n} from \"./types.js\";\nimport { deepClone, formatLinks, getTestResultHistoryId, getTestResultTestCaseId, randomUuid } from \"./utils.js\";\nimport { buildAttachmentFileName } from \"./utils/attachments.js\";\nimport { resolveWriter } from \"./writer/loader.js\";\n\nexport interface StepStack {\n clear(): void;\n\n removeRoot(rootUuid: string): void;\n\n currentStep(rootUuid: string): string | undefined;\n\n addStep(rootUuid: string, stepUuid: string): void;\n\n removeStep(stepUuid: string): void;\n}\n\n/**\n * Simpler steps stack implementation that contains only the current steps without root nodes\n * Useful, when you need to create steps without binding them to a specific test or fixture\n * @example\n * ```js\n * const stack = new ShallowStepsStack();\n *\n * stack.startStep({ name: \"step 1\" });\n * stack.startStep({ name: \"step 1.1\" });\n * stack.stopStep({ status: Status.FAILED });\n * stack.stopStep({ status: Status.PASSED });\n * stack.steps // => [{ name: \"step 1\", status: Status.PASSED, steps: [{ name: \"step 1.1\", status: Status.FAILED }] }]\n * ```\n */\nexport class ShallowStepsStack {\n steps: StepResult[] = [];\n\n #runningSteps: StepResult[] = [];\n\n get #currentStep() {\n return this.#runningSteps[this.#runningSteps.length - 1];\n }\n\n currentStep() {\n return this.#currentStep;\n }\n\n startStep(step: Partial<StepResult>) {\n const stepResult: StepResult = {\n ...createStepResult(),\n ...step,\n };\n\n if (this.#currentStep) {\n this.#currentStep.steps.push(stepResult);\n } else {\n this.steps.push(stepResult);\n }\n\n this.#runningSteps.push(stepResult);\n }\n\n updateStep(updateFunc: (result: StepResult) => void) {\n if (!this.#currentStep) {\n // eslint-disable-next-line no-console\n console.error(\"There is no running step in the stack to update!\");\n return;\n }\n\n updateFunc(this.#currentStep);\n }\n\n stopStep(opts?: { stop?: number; duration?: number }) {\n if (!this.#currentStep) {\n // eslint-disable-next-line no-console\n console.error(\"There is no running step in the stack to stop!\");\n return;\n }\n\n const { stop, duration = 0 } = opts ?? {};\n\n this.updateStep((result) => {\n result.stop = stop ?? result.start ? result.start! + duration : undefined;\n });\n\n this.#runningSteps.pop();\n }\n\n findStepByUuid(uuid: string): StepResult | undefined {\n const findRecursively = (steps: StepResult[]): StepResult | undefined => {\n for (const s of steps) {\n if (s.uuid === uuid) {\n return s;\n }\n const found = findRecursively(s.steps);\n if (found) {\n return found;\n }\n }\n return undefined;\n };\n return findRecursively(this.steps);\n }\n\n addAttachment(attachment: AttachmentOptions, writer: Writer) {\n const isPath = !!attachment.path;\n const fileExt = attachment.path ? path.extname(attachment.path) : undefined;\n const fileName = buildAttachmentFileName({\n contentType: attachment.contentType,\n fileExtension: fileExt,\n });\n if (isPath) {\n writer.writeAttachmentFromPath(fileName, attachment.path as string);\n } else if (attachment.body) {\n writer.writeAttachment(fileName, attachment.body);\n }\n return fileName;\n }\n}\n\nexport class DefaultStepStack implements StepStack {\n private stepsByRoot: Map<string, string[]> = new Map();\n private rootsByStep: Map<string, string> = new Map();\n\n clear = (): void => {\n this.stepsByRoot.clear();\n this.rootsByStep.clear();\n };\n\n removeRoot = (rootUuid: string): void => {\n const maybeValue = this.stepsByRoot.get(rootUuid);\n this.stepsByRoot.delete(rootUuid);\n if (maybeValue) {\n maybeValue.forEach((stepUuid) => this.rootsByStep.delete(stepUuid));\n }\n };\n\n currentStep = (rootUuid: string): string | undefined => {\n const maybeValue = this.stepsByRoot.get(rootUuid);\n if (!maybeValue) {\n return;\n }\n return maybeValue[maybeValue.length - 1];\n };\n\n addStep = (rootUuid: string, stepUuid: string): void => {\n const maybeValue = this.stepsByRoot.get(rootUuid);\n if (!maybeValue) {\n this.stepsByRoot.set(rootUuid, [stepUuid]);\n } else {\n maybeValue.push(stepUuid);\n }\n this.rootsByStep.set(stepUuid, rootUuid);\n };\n\n removeStep(stepUuid: string) {\n const rootUuid = this.rootsByStep.get(stepUuid);\n if (!rootUuid) {\n return;\n }\n const maybeValue = this.stepsByRoot.get(rootUuid);\n if (!maybeValue) {\n return;\n }\n const newValue = maybeValue.filter((value) => value !== stepUuid);\n this.stepsByRoot.set(rootUuid, newValue);\n }\n}\n\nexport class ReporterRuntime {\n private readonly state = new LifecycleState();\n private notifier: Notifier;\n private stepStack: StepStack = new DefaultStepStack();\n writer: Writer;\n categories?: Category[];\n environmentInfo?: EnvironmentInfo;\n linkConfig?: LinkConfig;\n globalLabels: Label[] = [];\n\n constructor({\n writer,\n listeners = [],\n environmentInfo,\n categories,\n links,\n globalLabels = {},\n }: ReporterRuntimeConfig) {\n this.writer = resolveWriter(writer);\n this.notifier = new Notifier({ listeners });\n this.categories = categories;\n this.environmentInfo = environmentInfo;\n this.linkConfig = links;\n\n if (Array.isArray(globalLabels)) {\n this.globalLabels = globalLabels;\n } else if (Object.keys(globalLabels).length) {\n this.globalLabels = Object.entries(globalLabels).flatMap(([name, value]) => {\n if (Array.isArray(value)) {\n return value.map((v) => ({ name, value: v }));\n }\n\n return {\n name,\n value,\n };\n });\n }\n }\n\n startScope = (): string => {\n const uuid = randomUuid();\n this.state.setScope(uuid);\n return uuid;\n };\n\n updateScope = (uuid: string, updateFunc: (scope: TestScope) => void): void => {\n const scope = this.state.getScope(uuid);\n if (!scope) {\n // eslint-disable-next-line no-console\n console.error(`count not update scope: no scope with uuid ${uuid} is found`);\n return;\n }\n\n updateFunc(scope);\n };\n\n writeScope = (uuid: string) => {\n const scope = this.state.getScope(uuid);\n if (!scope) {\n // eslint-disable-next-line no-console\n console.error(`count not write scope: no scope with uuid ${uuid} is found`);\n return;\n }\n\n this.#writeFixturesOfScope(scope);\n this.state.deleteScope(scope.uuid);\n };\n\n startFixture = (scopeUuid: string, type: FixtureType, fixtureResult: Partial<FixtureResult>): string | undefined => {\n const scope = this.state.getScope(scopeUuid);\n if (!scope) {\n // eslint-disable-next-line no-console\n console.error(`count not start fixture: no scope with uuid ${scopeUuid} is found`);\n return;\n }\n\n const uuid = randomUuid();\n const wrappedFixture = this.state.setFixtureResult(scopeUuid, uuid, type, {\n ...createFixtureResult(),\n start: Date.now(),\n ...fixtureResult,\n });\n\n scope.fixtures.push(wrappedFixture);\n return uuid;\n };\n\n updateFixture = (uuid: string, updateFunc: (result: FixtureResult) => void): void => {\n const fixture = this.state.getFixtureResult(uuid);\n\n if (!fixture) {\n // eslint-disable-next-line no-console\n console.error(`could not update fixture: no fixture with uuid ${uuid} is found`);\n return;\n }\n\n updateFunc(fixture);\n };\n\n stopFixture = (uuid: string, opts?: { stop?: number; duration?: number }): void => {\n const fixture = this.state.getFixtureResult(uuid);\n if (!fixture) {\n // eslint-disable-next-line no-console\n console.error(`could not stop fixture: no fixture with uuid ${uuid} is found`);\n return;\n }\n\n const startStop = this.#calculateTimings(fixture.start, opts?.stop, opts?.duration);\n fixture.start = startStop.start;\n fixture.stop = startStop.stop;\n\n fixture.stage = Stage.FINISHED;\n };\n\n startTest = (result: Partial<TestResult>, scopeUuids: string[] = []): string => {\n const uuid = randomUuid();\n const testResult: TestResult = {\n ...createTestResult(uuid),\n start: Date.now(),\n ...deepClone(result),\n };\n\n this.notifier.beforeTestResultStart(testResult);\n\n scopeUuids.forEach((scopeUuid) => {\n const scope = this.state.getScope(scopeUuid);\n if (!scope) {\n // eslint-disable-next-line no-console\n console.error(`count not link test to the scope: no scope with uuid ${uuid} is found`);\n return;\n }\n scope.tests.push(uuid);\n });\n\n this.state.setTestResult(uuid, testResult, scopeUuids);\n this.notifier.afterTestResultStart(testResult);\n return uuid;\n };\n\n updateTest = (uuid: string, updateFunc: (result: TestResult) => void): void => {\n const testResult = this.state.getTestResult(uuid);\n\n if (!testResult) {\n // eslint-disable-next-line no-console\n console.error(`could not update test result: no test with uuid ${uuid}) is found`);\n return;\n }\n\n this.notifier.beforeTestResultUpdate(testResult);\n updateFunc(testResult);\n this.notifier.afterTestResultUpdate(testResult);\n };\n\n stopTest = (uuid: string, opts?: { stop?: number; duration?: number }) => {\n const wrapped = this.state.getWrappedTestResult(uuid);\n if (!wrapped) {\n // eslint-disable-next-line no-console\n console.error(`could not stop test result: no test with uuid ${uuid}) is found`);\n return;\n }\n\n const testResult = wrapped.value;\n\n this.notifier.beforeTestResultStop(testResult);\n\n const scopeUuids = wrapped.scopeUuids;\n\n scopeUuids.forEach((scopeUuid) => {\n const scope = this.state.getScope(scopeUuid);\n\n if (scope?.labels) {\n testResult.labels = [...testResult.labels, ...scope.labels];\n }\n\n if (scope?.links) {\n testResult.links = [...testResult.links, ...scope.links];\n }\n\n if (scope?.parameters) {\n testResult.parameters = [...testResult.parameters, ...scope.parameters];\n }\n\n if (scope?.description) {\n testResult.description = testResult.description ?? scope.description;\n }\n\n if (scope?.descriptionHtml) {\n testResult.descriptionHtml = testResult.descriptionHtml ?? scope.descriptionHtml;\n }\n });\n\n testResult.labels = [...this.globalLabels, ...testResult.labels];\n\n testResult.testCaseId ??= getTestResultTestCaseId(testResult);\n testResult.historyId ??= getTestResultHistoryId(testResult);\n\n const startStop = this.#calculateTimings(testResult.start, opts?.stop, opts?.duration);\n\n testResult.start = startStop.start;\n testResult.stop = startStop.stop;\n\n this.notifier.afterTestResultStop(testResult);\n };\n\n writeTest = (uuid: string) => {\n const testResult = this.state.getTestResult(uuid);\n if (!testResult) {\n // eslint-disable-next-line no-console\n console.error(`could not write test result: no test with uuid ${uuid} is found`);\n return;\n }\n\n if (hasSkipLabel(testResult.labels)) {\n this.state.deleteTestResult(uuid);\n return;\n }\n\n this.notifier.beforeTestResultWrite(testResult);\n\n this.writer.writeResult(testResult);\n this.state.deleteTestResult(uuid);\n\n this.notifier.afterTestResultWrite(testResult);\n };\n\n currentStep = (rootUuid: string): string | undefined => {\n return this.stepStack.currentStep(rootUuid);\n };\n\n startStep = (\n rootUuid: string,\n parentStepUuid: string | null | undefined,\n result: Partial<StepResult>,\n ): string | undefined => {\n const parent = this.#findParent(rootUuid, parentStepUuid);\n if (!parent) {\n // eslint-disable-next-line no-console\n console.error(\n `could not start test step: no context for root ${rootUuid} and parentStepUuid ${JSON.stringify(parentStepUuid)} is found`,\n );\n return;\n }\n const stepResult: StepResult = {\n ...createStepResult(),\n start: Date.now(),\n ...result,\n };\n parent.steps.push(stepResult);\n const stepUuid = randomUuid();\n this.state.setStepResult(stepUuid, stepResult);\n\n this.stepStack.addStep(rootUuid, stepUuid);\n\n return stepUuid;\n };\n\n updateStep = (uuid: string, updateFunc: (stepResult: StepResult) => void) => {\n const step = this.state.getStepResult(uuid)!;\n if (!step) {\n // eslint-disable-next-line no-console\n console.error(`could not update test step: no step with uuid ${uuid} is found`);\n return;\n }\n\n updateFunc(step);\n };\n\n stopStep = (uuid: string, opts?: { stop?: number; duration?: number }) => {\n const step = this.state.getStepResult(uuid);\n if (!step) {\n // eslint-disable-next-line no-console\n console.error(`could not stop test step: no step with uuid ${uuid} is found`);\n return;\n }\n\n this.notifier.beforeStepStop(step);\n\n const startStop = this.#calculateTimings(step.start, opts?.stop, opts?.duration);\n step.start = startStop.start;\n step.stop = startStop.stop;\n\n step.stage = Stage.FINISHED;\n\n this.stepStack.removeStep(uuid);\n\n this.notifier.afterStepStop(step);\n };\n\n writeAttachment = (\n rootUuid: string,\n parentStepUuid: string | null | undefined,\n attachmentName: string,\n attachmentContentOrPath: Buffer | string,\n options: AttachmentOptions & { wrapInStep?: boolean; timestamp?: number },\n ) => {\n const parent = this.#findParent(rootUuid, parentStepUuid);\n if (!parent) {\n // eslint-disable-next-line no-console\n console.error(\n `could not write test attachment: no context for root ${rootUuid} and parentStepUuid ${JSON.stringify(parentStepUuid)} is found`,\n );\n return;\n }\n\n const isPath = typeof attachmentContentOrPath === \"string\";\n const fileExtension = options.fileExtension ?? (isPath ? extname(attachmentContentOrPath) : undefined);\n const attachmentFileName = buildAttachmentFileName({\n contentType: options.contentType,\n fileExtension,\n });\n\n if (isPath) {\n this.writer.writeAttachmentFromPath(attachmentFileName, attachmentContentOrPath);\n } else {\n this.writer.writeAttachment(attachmentFileName, attachmentContentOrPath);\n }\n\n const attachment: Attachment = {\n name: attachmentName,\n source: attachmentFileName,\n type: options.contentType,\n };\n\n if (options.wrapInStep) {\n const { timestamp = Date.now() } = options;\n parent.steps.push({\n name: attachmentName,\n attachments: [attachment],\n start: timestamp,\n stop: timestamp,\n } as StepResult);\n } else {\n parent.attachments.push(attachment);\n }\n };\n\n writeEnvironmentInfo = () => {\n if (!this.environmentInfo) {\n return;\n }\n\n this.writer.writeEnvironmentInfo(this.environmentInfo);\n };\n\n writeCategoriesDefinitions = () => {\n if (!this.categories) {\n return;\n }\n\n const serializedCategories = this.categories.map((c) => {\n if (c.messageRegex instanceof RegExp) {\n c.messageRegex = c.messageRegex.source;\n }\n\n if (c.traceRegex instanceof RegExp) {\n c.traceRegex = c.traceRegex.source;\n }\n\n return c;\n });\n\n this.writer.writeCategoriesDefinitions(serializedCategories);\n };\n\n applyRuntimeMessages = (rootUuid: string, messages: RuntimeMessage[]) => {\n messages.forEach((message) => {\n switch (message.type) {\n case \"metadata\":\n this.#handleMetadataMessage(rootUuid, message.data);\n return;\n case \"step_metadata\":\n this.#handleStepMetadataMessage(rootUuid, message.data);\n return;\n case \"step_start\":\n this.#handleStartStepMessage(rootUuid, message.data);\n return;\n case \"step_stop\":\n this.#handleStopStepMessage(rootUuid, message.data);\n return;\n case \"attachment_content\":\n this.#handleAttachmentContentMessage(rootUuid, message.data);\n return;\n case \"attachment_path\":\n this.#handleAttachmentPathMessage(rootUuid, message.data);\n return;\n default:\n // eslint-disable-next-line no-console\n console.error(`could not apply runtime messages: unknown message ${JSON.stringify(message)}`);\n return;\n }\n });\n };\n\n #handleMetadataMessage = (rootUuid: string, message: RuntimeMetadataMessage[\"data\"]) => {\n // only display name could be set to fixture.\n const fixtureResult = this.state.getWrappedFixtureResult(rootUuid);\n const { links, labels, parameters, displayName, testCaseId, historyId, description, descriptionHtml } = message;\n\n if (fixtureResult) {\n if (displayName) {\n this.updateFixture(rootUuid, (result) => {\n result.name = displayName;\n });\n }\n\n if (historyId) {\n // eslint-disable-next-line no-console\n console.error(\"historyId can't be changed within test fixtures\");\n }\n if (testCaseId) {\n // eslint-disable-next-line no-console\n console.error(\"testCaseId can't be changed within test fixtures\");\n }\n\n if (links || labels || parameters || description || descriptionHtml) {\n // in some frameworks, afterEach methods can be executed before test stop event, while\n // in others after. To remove the possible undetermined behaviour we only allow\n // using runtime metadata API in before hooks.\n if (fixtureResult.type === \"after\") {\n // eslint-disable-next-line no-console\n console.error(\"metadata messages isn't supported for after test fixtures\");\n return;\n }\n\n this.updateScope(fixtureResult.scopeUuid, (scope) => {\n if (links) {\n scope.links = [...scope.links, ...(this.linkConfig ? formatLinks(this.linkConfig, links) : links)];\n }\n if (labels) {\n scope.labels = [...scope.labels, ...labels];\n }\n if (parameters) {\n scope.parameters = [...scope.parameters, ...parameters];\n }\n if (description) {\n scope.description = description;\n }\n if (descriptionHtml) {\n scope.descriptionHtml = descriptionHtml;\n }\n });\n }\n\n return;\n }\n\n this.updateTest(rootUuid, (result) => {\n if (links) {\n result.links = [...result.links, ...(this.linkConfig ? formatLinks(this.linkConfig, links) : links)];\n }\n if (labels) {\n result.labels = [...result.labels, ...labels];\n }\n if (parameters) {\n result.parameters = [...result.parameters, ...parameters];\n }\n if (displayName) {\n result.name = displayName;\n }\n if (testCaseId) {\n result.testCaseId = testCaseId;\n }\n if (historyId) {\n result.historyId = historyId;\n }\n if (description) {\n result.description = description;\n }\n if (descriptionHtml) {\n result.descriptionHtml = descriptionHtml;\n }\n });\n };\n\n #handleStepMetadataMessage = (rootUuid: string, message: RuntimeStepMetadataMessage[\"data\"]) => {\n const stepUuid = this.currentStep(rootUuid);\n if (!stepUuid) {\n // eslint-disable-next-line no-console\n console.error(\"could not handle step metadata message: no step is running\");\n return;\n }\n const { name, parameters } = message;\n this.updateStep(stepUuid, (stepResult) => {\n if (name) {\n stepResult.name = name;\n }\n if (parameters) {\n stepResult.parameters = [...stepResult.parameters, ...parameters];\n }\n });\n };\n\n #handleStartStepMessage = (rootUuid: string, message: RuntimeStartStepMessage[\"data\"]) => {\n this.startStep(rootUuid, undefined, { ...message });\n };\n\n #handleStopStepMessage = (rootUuid: string, message: RuntimeStopStepMessage[\"data\"]) => {\n const stepUuid = this.currentStep(rootUuid);\n if (!stepUuid) {\n // eslint-disable-next-line no-console\n console.error(\"could not handle step stop message: no step is running\");\n return;\n }\n this.updateStep(stepUuid, (result) => {\n if (message.status && !result.status) {\n result.status = message.status;\n }\n if (message.statusDetails) {\n result.statusDetails = { ...result.statusDetails, ...message.statusDetails };\n }\n });\n this.stopStep(stepUuid, { stop: message.stop });\n };\n\n #handleAttachmentContentMessage = (rootUuid: string, message: RuntimeAttachmentContentMessage[\"data\"]) => {\n this.writeAttachment(rootUuid, undefined, message.name, Buffer.from(message.content, message.encoding), {\n encoding: message.encoding,\n contentType: message.contentType,\n fileExtension: message.fileExtension,\n wrapInStep: message.wrapInStep,\n timestamp: message.timestamp,\n });\n };\n\n #handleAttachmentPathMessage = (rootUuid: string, message: RuntimeAttachmentPathMessage[\"data\"]) => {\n this.writeAttachment(rootUuid, undefined, message.name, message.path, {\n contentType: message.contentType,\n fileExtension: message.fileExtension,\n wrapInStep: message.wrapInStep,\n timestamp: message.timestamp,\n });\n };\n\n #findParent = (\n rootUuid: string,\n parentStepUuid: string | null | undefined,\n ): FixtureResult | TestResult | StepResult | undefined => {\n const root = this.state.getExecutionItem(rootUuid);\n if (!root) {\n return;\n }\n\n if (parentStepUuid === null) {\n return root;\n } else if (parentStepUuid === undefined) {\n const stepUuid = this.currentStep(rootUuid);\n return stepUuid ? this.state.getStepResult(stepUuid) : root;\n } else {\n return this.state.getStepResult(parentStepUuid);\n }\n };\n\n #writeFixturesOfScope = ({ fixtures, tests }: TestScope) => {\n const writtenFixtures = new Set<string>();\n if (tests.length) {\n for (const wrappedFixture of fixtures) {\n if (!writtenFixtures.has(wrappedFixture.uuid)) {\n this.#writeContainer(tests, wrappedFixture);\n this.state.deleteFixtureResult(wrappedFixture.uuid);\n writtenFixtures.add(wrappedFixture.uuid);\n }\n }\n }\n };\n\n #writeContainer = (tests: string[], wrappedFixture: FixtureResultWrapper) => {\n const fixture = wrappedFixture.value;\n const befores = wrappedFixture.type === \"before\" ? [wrappedFixture.value] : [];\n const afters = wrappedFixture.type === \"after\" ? [wrappedFixture.value] : [];\n this.writer.writeGroup({\n uuid: wrappedFixture.uuid,\n name: fixture.name,\n children: [...new Set(tests)],\n befores,\n afters,\n });\n };\n\n #calculateTimings = (\n start?: number,\n stop?: number,\n duration?: number,\n ): {\n start?: number;\n stop?: number;\n } => {\n const result: { start?: number; stop?: number } = { start, stop };\n if (duration) {\n const normalisedDuration = Math.max(0, duration);\n if (result.stop !== undefined) {\n result.start = result.stop - normalisedDuration;\n } else if (result.start !== undefined) {\n result.stop = result.start + normalisedDuration;\n } else {\n result.stop = Date.now();\n result.start = result.stop - normalisedDuration;\n }\n } else {\n if (result.stop === undefined) {\n result.stop = Date.now();\n }\n if (result.start === undefined) {\n result.start = result.stop;\n }\n }\n return {\n start: result.start ? Math.round(result.start) : undefined,\n stop: result.stop ? Math.round(result.stop) : undefined,\n };\n };\n}\n"],"mappings":";;;;;;;;;;;AAAA;AACA,OAAOA,IAAI,MAAM,WAAW;AAC5B,SAASC,OAAO,QAAQ,MAAM;AAC9B,SAKEC,KAAK,QAGA,gBAAgB;AAYvB,SAASC,cAAc,QAAQ,qBAAqB;AACpD,SAASC,QAAQ,QAAQ,eAAe;AACxC,SAASC,mBAAmB,EAAEC,gBAAgB,EAAEC,gBAAgB,QAAQ,cAAc;AACtF,SAASC,YAAY,QAAQ,eAAe;AAS5C,SAASC,SAAS,EAAEC,WAAW,EAAEC,sBAAsB,EAAEC,uBAAuB,EAAEC,UAAU,QAAQ,YAAY;AAChH,SAASC,uBAAuB,QAAQ,wBAAwB;AAChE,SAASC,aAAa,QAAQ,oBAAoB;AAAC,IAAAC,aAAA,oBAAAC,OAAA;AAAA,IAAAC,wBAAA,oBAAAC,OAAA;AAcnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,iBAAiB,CAAC;EAAAC,YAAA;IAAAC,2BAAA,OAAAJ,wBAAA;IAAAK,eAAA,gBACP,EAAE;IAExBC,0BAAA,OAAAR,aAAa,EAAiB,EAAE;EAAC;EAMjCS,WAAWA,CAAA,EAAG;IACZ,OAAOC,mBAAA,CAAAR,wBAAA,MAAI,EAACS,gBAAW,CAAC;EAC1B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K,GAAGD,MAAM,CAACF,IAAI;QAC5B;MACF;MACA,OAAO;QACLG,KAAK,EAAED,MAAM,CAACC,KAAK,GAAGgK,IAAI,CAACE,KAAK,CAACnK,MAAM,CAACC,KAAK,CAAC,GAAGC,SAAS;QAC1DJ,IAAI,EAAEE,MAAM,CAACF,IAAI,GAAGmK,IAAI,CAACE,KAAK,CAACnK,MAAM,CAACF,IAAI,CAAC,GAAGI;MAChD,CAAC;IACH,CAAC;IAhlBC,IAAI,CAACS,MAAM,GAAGvC,aAAa,CAACuC,MAAM,CAAC;IACnC,IAAI,CAACoE,QAAQ,GAAG,IAAItH,QAAQ,CAAC;MAAE0F;IAAU,CAAC,CAAC;IAC3C,IAAI,CAACE,UAAU,GAAGA,UAAU;IAC5B,IAAI,CAACD,eAAe,GAAGA,eAAe;IACtC,IAAI,CAACwF,UAAU,GAAGtF,MAAK;IAEvB,IAAI8G,KAAK,CAACC,OAAO,CAAC9G,YAAY,CAAC,EAAE;MAC/B,IAAI,CAACA,YAAY,GAAGA,YAAY;IAClC,CAAC,MAAM,IAAI+G,MAAM,CAACC,IAAI,CAAChH,YAAY,CAAC,CAAClC,MAAM,EAAE;MAC3C,IAAI,CAACkC,YAAY,GAAG+G,MAAM,CAACE,OAAO,CAACjH,YAAY,CAAC,CAACkH,OAAO,CAACC,KAAA,IAAmB;QAAA,IAAlB,CAAClD,IAAI,EAAEnF,KAAK,CAAC,GAAAqI,KAAA;QACrE,IAAIN,KAAK,CAACC,OAAO,CAAChI,KAAK,CAAC,EAAE;UACxB,OAAOA,KAAK,CAAC0F,GAAG,CAAE4C,CAAC,KAAM;YAAEnD,IAAI;YAAEnF,KAAK,EAAEsI;UAAE,CAAC,CAAC,CAAC;QAC/C;QAEA,OAAO;UACLnD,IAAI;UACJnF;QACF,CAAC;MACH,CAAC,CAAC;IACJ;EACF;AA6jBF","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"ReporterRuntime.js","names":["path","extname","Stage","LifecycleState","Notifier","createFixtureResult","createStepResult","createTestResult","hasSkipLabel","deepClone","formatLinks","getTestResultHistoryId","getTestResultTestCaseId","randomUuid","buildAttachmentFileName","resolveWriter","_runningSteps","WeakMap","_ShallowStepsStack_brand","WeakSet","ShallowStepsStack","constructor","_classPrivateMethodInitSpec","_defineProperty","_classPrivateFieldInitSpec","currentStep","_classPrivateGetter","_get_currentStep","startStep","step","stepResult","_objectSpread","steps","push","_classPrivateFieldGet","updateStep","updateFunc","console","error","stopStep","opts","stop","duration","result","start","undefined","pop","findStepByUuid","uuid","findRecursively","s","found","addAttachment","attachment","writer","isPath","fileExt","fileName","contentType","fileExtension","writeAttachmentFromPath","body","writeAttachment","_this","length","DefaultStepStack","Map","stepsByRoot","clear","rootsByStep","rootUuid","maybeValue","get","delete","forEach","stepUuid","set","removeStep","newValue","filter","value","_handleMetadataMessage","_handleStepMetadataMessage","_handleStartStepMessage","_handleStopStepMessage","_handleAttachmentContentMessage","_handleAttachmentPathMessage","_handleGlobalAttachmentContentMessage","_handleGlobalAttachmentPathMessage","_handleGlobalErrorMessage","_findParent","_writeAttachmentFile","_createAttachment","_createGlobalAttachment","_writeGlobals","_writeFixturesOfScope","_writeContainer","_calculateTimings","ReporterRuntime","_ref","_this2","listeners","environmentInfo","categories","links","globalLabels","state","setScope","scope","getScope","concat","call","deleteScope","scopeUuid","type","fixtureResult","wrappedFixture","setFixtureResult","Date","now","fixtures","fixture","getFixtureResult","startStop","stage","FINISHED","scopeUuids","arguments","testResult","notifier","beforeTestResultStart","tests","setTestResult","afterTestResultStart","getTestResult","beforeTestResultUpdate","afterTestResultUpdate","_testResult$testCaseI","_testResult$historyId","wrapped","getWrappedTestResult","beforeTestResultStop","labels","parameters","description","_testResult$descripti","descriptionHtml","_testResult$descripti2","testCaseId","historyId","afterTestResultStop","deleteTestResult","beforeTestResultWrite","writeResult","afterTestResultWrite","stepStack","parentStepUuid","parent","JSON","stringify","setStepResult","addStep","getStepResult","beforeStepStop","afterStepStop","attachmentName","attachmentContentOrPath","options","_options$fileExtensio","attachmentFileName","wrapInStep","timestamp","name","attachments","writeEnvironmentInfo","serializedCategories","map","c","messageRegex","RegExp","source","traceRegex","writeCategoriesDefinitions","messages","message","data","getWrappedFixtureResult","displayName","updateFixture","updateScope","linkConfig","updateTest","status","statusDetails","Buffer","from","content","encoding","attachmentContent","attachmentSource","errors","_message$fileExtensio","root","getExecutionItem","globals","writeGlobals","_ref2","writtenFixtures","Set","has","deleteFixtureResult","add","befores","afters","writeGroup","children","normalisedDuration","Math","max","round","Array","isArray","Object","keys","entries","flatMap","_ref3","v"],"sources":["../../../../src/sdk/reporter/ReporterRuntime.ts"],"sourcesContent":["/* eslint max-lines: 0 */\nimport path from \"node:path\";\nimport { extname } from \"path\";\nimport {\n type Attachment,\n type AttachmentOptions,\n type FixtureResult,\n type Globals,\n type Label,\n Stage,\n type StepResult,\n type TestResult,\n} from \"../../model.js\";\nimport type {\n Category,\n EnvironmentInfo,\n RuntimeAttachmentContentMessage,\n RuntimeAttachmentPathMessage,\n RuntimeGlobalAttachmentContentMessage,\n RuntimeGlobalAttachmentPathMessage,\n RuntimeGlobalErrorMessage,\n RuntimeMessage,\n RuntimeMetadataMessage,\n RuntimeStartStepMessage,\n RuntimeStepMetadataMessage,\n RuntimeStopStepMessage,\n} from \"../types.js\";\nimport { LifecycleState } from \"./LifecycleState.js\";\nimport { Notifier } from \"./Notifier.js\";\nimport { createFixtureResult, createStepResult, createTestResult } from \"./factory.js\";\nimport { hasSkipLabel } from \"./testplan.js\";\nimport type {\n FixtureResultWrapper,\n FixtureType,\n LinkConfig,\n ReporterRuntimeConfig,\n TestScope,\n Writer,\n} from \"./types.js\";\nimport { deepClone, formatLinks, getTestResultHistoryId, getTestResultTestCaseId, randomUuid } from \"./utils.js\";\nimport { buildAttachmentFileName } from \"./utils/attachments.js\";\nimport { resolveWriter } from \"./writer/loader.js\";\n\nexport interface StepStack {\n clear(): void;\n\n removeRoot(rootUuid: string): void;\n\n currentStep(rootUuid: string): string | undefined;\n\n addStep(rootUuid: string, stepUuid: string): void;\n\n removeStep(stepUuid: string): void;\n}\n\n/**\n * Simpler steps stack implementation that contains only the current steps without root nodes\n * Useful, when you need to create steps without binding them to a specific test or fixture\n * @example\n * ```js\n * const stack = new ShallowStepsStack();\n *\n * stack.startStep({ name: \"step 1\" });\n * stack.startStep({ name: \"step 1.1\" });\n * stack.stopStep({ status: Status.FAILED });\n * stack.stopStep({ status: Status.PASSED });\n * stack.steps // => [{ name: \"step 1\", status: Status.PASSED, steps: [{ name: \"step 1.1\", status: Status.FAILED }] }]\n * ```\n */\nexport class ShallowStepsStack {\n steps: StepResult[] = [];\n\n #runningSteps: StepResult[] = [];\n\n get #currentStep() {\n return this.#runningSteps[this.#runningSteps.length - 1];\n }\n\n currentStep() {\n return this.#currentStep;\n }\n\n startStep(step: Partial<StepResult>) {\n const stepResult: StepResult = {\n ...createStepResult(),\n ...step,\n };\n\n if (this.#currentStep) {\n this.#currentStep.steps.push(stepResult);\n } else {\n this.steps.push(stepResult);\n }\n\n this.#runningSteps.push(stepResult);\n }\n\n updateStep(updateFunc: (result: StepResult) => void) {\n if (!this.#currentStep) {\n // eslint-disable-next-line no-console\n console.error(\"There is no running step in the stack to update!\");\n return;\n }\n\n updateFunc(this.#currentStep);\n }\n\n stopStep(opts?: { stop?: number; duration?: number }) {\n if (!this.#currentStep) {\n // eslint-disable-next-line no-console\n console.error(\"There is no running step in the stack to stop!\");\n return;\n }\n\n const { stop, duration = 0 } = opts ?? {};\n\n this.updateStep((result) => {\n result.stop = stop ?? result.start ? result.start! + duration : undefined;\n });\n\n this.#runningSteps.pop();\n }\n\n findStepByUuid(uuid: string): StepResult | undefined {\n const findRecursively = (steps: StepResult[]): StepResult | undefined => {\n for (const s of steps) {\n if (s.uuid === uuid) {\n return s;\n }\n const found = findRecursively(s.steps);\n if (found) {\n return found;\n }\n }\n return undefined;\n };\n return findRecursively(this.steps);\n }\n\n addAttachment(attachment: AttachmentOptions, writer: Writer) {\n const isPath = !!attachment.path;\n const fileExt = attachment.path ? path.extname(attachment.path) : undefined;\n const fileName = buildAttachmentFileName({\n contentType: attachment.contentType,\n fileExtension: fileExt,\n });\n if (isPath) {\n writer.writeAttachmentFromPath(fileName, attachment.path as string);\n } else if (attachment.body) {\n writer.writeAttachment(fileName, attachment.body);\n }\n return fileName;\n }\n}\n\nexport class DefaultStepStack implements StepStack {\n private stepsByRoot: Map<string, string[]> = new Map();\n private rootsByStep: Map<string, string> = new Map();\n\n clear = (): void => {\n this.stepsByRoot.clear();\n this.rootsByStep.clear();\n };\n\n removeRoot = (rootUuid: string): void => {\n const maybeValue = this.stepsByRoot.get(rootUuid);\n this.stepsByRoot.delete(rootUuid);\n if (maybeValue) {\n maybeValue.forEach((stepUuid) => this.rootsByStep.delete(stepUuid));\n }\n };\n\n currentStep = (rootUuid: string): string | undefined => {\n const maybeValue = this.stepsByRoot.get(rootUuid);\n if (!maybeValue) {\n return;\n }\n return maybeValue[maybeValue.length - 1];\n };\n\n addStep = (rootUuid: string, stepUuid: string): void => {\n const maybeValue = this.stepsByRoot.get(rootUuid);\n if (!maybeValue) {\n this.stepsByRoot.set(rootUuid, [stepUuid]);\n } else {\n maybeValue.push(stepUuid);\n }\n this.rootsByStep.set(stepUuid, rootUuid);\n };\n\n removeStep(stepUuid: string) {\n const rootUuid = this.rootsByStep.get(stepUuid);\n if (!rootUuid) {\n return;\n }\n const maybeValue = this.stepsByRoot.get(rootUuid);\n if (!maybeValue) {\n return;\n }\n const newValue = maybeValue.filter((value) => value !== stepUuid);\n this.stepsByRoot.set(rootUuid, newValue);\n }\n}\n\nexport class ReporterRuntime {\n private readonly state = new LifecycleState();\n private notifier: Notifier;\n private stepStack: StepStack = new DefaultStepStack();\n writer: Writer;\n categories?: Category[];\n environmentInfo?: EnvironmentInfo;\n linkConfig?: LinkConfig;\n globalLabels: Label[] = [];\n\n constructor({\n writer,\n listeners = [],\n environmentInfo,\n categories,\n links,\n globalLabels = {},\n }: ReporterRuntimeConfig) {\n this.writer = resolveWriter(writer);\n this.notifier = new Notifier({ listeners });\n this.categories = categories;\n this.environmentInfo = environmentInfo;\n this.linkConfig = links;\n\n if (Array.isArray(globalLabels)) {\n this.globalLabels = globalLabels;\n } else if (Object.keys(globalLabels).length) {\n this.globalLabels = Object.entries(globalLabels).flatMap(([name, value]) => {\n if (Array.isArray(value)) {\n return value.map((v) => ({ name, value: v }));\n }\n\n return {\n name,\n value,\n };\n });\n }\n }\n\n startScope = (): string => {\n const uuid = randomUuid();\n this.state.setScope(uuid);\n return uuid;\n };\n\n updateScope = (uuid: string, updateFunc: (scope: TestScope) => void): void => {\n const scope = this.state.getScope(uuid);\n if (!scope) {\n // eslint-disable-next-line no-console\n console.error(`count not update scope: no scope with uuid ${uuid} is found`);\n return;\n }\n\n updateFunc(scope);\n };\n\n writeScope = (uuid: string) => {\n const scope = this.state.getScope(uuid);\n if (!scope) {\n // eslint-disable-next-line no-console\n console.error(`count not write scope: no scope with uuid ${uuid} is found`);\n return;\n }\n\n this.#writeFixturesOfScope(scope);\n this.state.deleteScope(scope.uuid);\n };\n\n startFixture = (scopeUuid: string, type: FixtureType, fixtureResult: Partial<FixtureResult>): string | undefined => {\n const scope = this.state.getScope(scopeUuid);\n if (!scope) {\n // eslint-disable-next-line no-console\n console.error(`count not start fixture: no scope with uuid ${scopeUuid} is found`);\n return;\n }\n\n const uuid = randomUuid();\n const wrappedFixture = this.state.setFixtureResult(scopeUuid, uuid, type, {\n ...createFixtureResult(),\n start: Date.now(),\n ...fixtureResult,\n });\n\n scope.fixtures.push(wrappedFixture);\n return uuid;\n };\n\n updateFixture = (uuid: string, updateFunc: (result: FixtureResult) => void): void => {\n const fixture = this.state.getFixtureResult(uuid);\n\n if (!fixture) {\n // eslint-disable-next-line no-console\n console.error(`could not update fixture: no fixture with uuid ${uuid} is found`);\n return;\n }\n\n updateFunc(fixture);\n };\n\n stopFixture = (uuid: string, opts?: { stop?: number; duration?: number }): void => {\n const fixture = this.state.getFixtureResult(uuid);\n if (!fixture) {\n // eslint-disable-next-line no-console\n console.error(`could not stop fixture: no fixture with uuid ${uuid} is found`);\n return;\n }\n\n const startStop = this.#calculateTimings(fixture.start, opts?.stop, opts?.duration);\n fixture.start = startStop.start;\n fixture.stop = startStop.stop;\n\n fixture.stage = Stage.FINISHED;\n };\n\n startTest = (result: Partial<TestResult>, scopeUuids: string[] = []): string => {\n const uuid = randomUuid();\n const testResult: TestResult = {\n ...createTestResult(uuid),\n start: Date.now(),\n ...deepClone(result),\n };\n\n this.notifier.beforeTestResultStart(testResult);\n\n scopeUuids.forEach((scopeUuid) => {\n const scope = this.state.getScope(scopeUuid);\n if (!scope) {\n // eslint-disable-next-line no-console\n console.error(`count not link test to the scope: no scope with uuid ${uuid} is found`);\n return;\n }\n scope.tests.push(uuid);\n });\n\n this.state.setTestResult(uuid, testResult, scopeUuids);\n this.notifier.afterTestResultStart(testResult);\n return uuid;\n };\n\n updateTest = (uuid: string, updateFunc: (result: TestResult) => void): void => {\n const testResult = this.state.getTestResult(uuid);\n\n if (!testResult) {\n // eslint-disable-next-line no-console\n console.error(`could not update test result: no test with uuid ${uuid}) is found`);\n return;\n }\n\n this.notifier.beforeTestResultUpdate(testResult);\n updateFunc(testResult);\n this.notifier.afterTestResultUpdate(testResult);\n };\n\n stopTest = (uuid: string, opts?: { stop?: number; duration?: number }) => {\n const wrapped = this.state.getWrappedTestResult(uuid);\n if (!wrapped) {\n // eslint-disable-next-line no-console\n console.error(`could not stop test result: no test with uuid ${uuid}) is found`);\n return;\n }\n\n const testResult = wrapped.value;\n\n this.notifier.beforeTestResultStop(testResult);\n\n const scopeUuids = wrapped.scopeUuids;\n\n scopeUuids.forEach((scopeUuid) => {\n const scope = this.state.getScope(scopeUuid);\n\n if (scope?.labels) {\n testResult.labels = [...testResult.labels, ...scope.labels];\n }\n\n if (scope?.links) {\n testResult.links = [...testResult.links, ...scope.links];\n }\n\n if (scope?.parameters) {\n testResult.parameters = [...testResult.parameters, ...scope.parameters];\n }\n\n if (scope?.description) {\n testResult.description = testResult.description ?? scope.description;\n }\n\n if (scope?.descriptionHtml) {\n testResult.descriptionHtml = testResult.descriptionHtml ?? scope.descriptionHtml;\n }\n });\n\n testResult.labels = [...this.globalLabels, ...testResult.labels];\n\n testResult.testCaseId ??= getTestResultTestCaseId(testResult);\n testResult.historyId ??= getTestResultHistoryId(testResult);\n\n const startStop = this.#calculateTimings(testResult.start, opts?.stop, opts?.duration);\n\n testResult.start = startStop.start;\n testResult.stop = startStop.stop;\n\n this.notifier.afterTestResultStop(testResult);\n };\n\n writeTest = (uuid: string) => {\n const testResult = this.state.getTestResult(uuid);\n if (!testResult) {\n // eslint-disable-next-line no-console\n console.error(`could not write test result: no test with uuid ${uuid} is found`);\n return;\n }\n\n if (hasSkipLabel(testResult.labels)) {\n this.state.deleteTestResult(uuid);\n return;\n }\n\n this.notifier.beforeTestResultWrite(testResult);\n\n this.writer.writeResult(testResult);\n this.state.deleteTestResult(uuid);\n\n this.notifier.afterTestResultWrite(testResult);\n };\n\n currentStep = (rootUuid: string): string | undefined => {\n return this.stepStack.currentStep(rootUuid);\n };\n\n startStep = (\n rootUuid: string,\n parentStepUuid: string | null | undefined,\n result: Partial<StepResult>,\n ): string | undefined => {\n const parent = this.#findParent(rootUuid, parentStepUuid);\n if (!parent) {\n // eslint-disable-next-line no-console\n console.error(\n `could not start test step: no context for root ${rootUuid} and parentStepUuid ${JSON.stringify(parentStepUuid)} is found`,\n );\n return;\n }\n const stepResult: StepResult = {\n ...createStepResult(),\n start: Date.now(),\n ...result,\n };\n parent.steps.push(stepResult);\n const stepUuid = randomUuid();\n this.state.setStepResult(stepUuid, stepResult);\n\n this.stepStack.addStep(rootUuid, stepUuid);\n\n return stepUuid;\n };\n\n updateStep = (uuid: string, updateFunc: (stepResult: StepResult) => void) => {\n const step = this.state.getStepResult(uuid)!;\n if (!step) {\n // eslint-disable-next-line no-console\n console.error(`could not update test step: no step with uuid ${uuid} is found`);\n return;\n }\n\n updateFunc(step);\n };\n\n stopStep = (uuid: string, opts?: { stop?: number; duration?: number }) => {\n const step = this.state.getStepResult(uuid);\n if (!step) {\n // eslint-disable-next-line no-console\n console.error(`could not stop test step: no step with uuid ${uuid} is found`);\n return;\n }\n\n this.notifier.beforeStepStop(step);\n\n const startStop = this.#calculateTimings(step.start, opts?.stop, opts?.duration);\n step.start = startStop.start;\n step.stop = startStop.stop;\n\n step.stage = Stage.FINISHED;\n\n this.stepStack.removeStep(uuid);\n\n this.notifier.afterStepStop(step);\n };\n\n writeAttachment = (\n rootUuid: string,\n parentStepUuid: string | null | undefined,\n attachmentName: string,\n attachmentContentOrPath: Buffer | string,\n options: AttachmentOptions & { wrapInStep?: boolean; timestamp?: number },\n ) => {\n const parent = this.#findParent(rootUuid, parentStepUuid);\n if (!parent) {\n // eslint-disable-next-line no-console\n console.error(\n `could not write test attachment: no context for root ${rootUuid} and parentStepUuid ${JSON.stringify(parentStepUuid)} is found`,\n );\n return;\n }\n\n const isPath = typeof attachmentContentOrPath === \"string\";\n const attachmentFileName = this.#writeAttachmentFile(attachmentContentOrPath, {\n ...options,\n fileExtension: options.fileExtension ?? (isPath ? extname(attachmentContentOrPath) : undefined),\n });\n const attachment = this.#createAttachment(attachmentName, options.contentType, attachmentFileName);\n\n if (options.wrapInStep) {\n const { timestamp = Date.now() } = options;\n parent.steps.push({\n name: attachmentName,\n attachments: [attachment],\n start: timestamp,\n stop: timestamp,\n } as StepResult);\n } else {\n parent.attachments.push(attachment);\n }\n };\n\n writeEnvironmentInfo = () => {\n if (!this.environmentInfo) {\n return;\n }\n\n this.writer.writeEnvironmentInfo(this.environmentInfo);\n };\n\n writeCategoriesDefinitions = () => {\n if (!this.categories) {\n return;\n }\n\n const serializedCategories = this.categories.map((c) => {\n if (c.messageRegex instanceof RegExp) {\n c.messageRegex = c.messageRegex.source;\n }\n\n if (c.traceRegex instanceof RegExp) {\n c.traceRegex = c.traceRegex.source;\n }\n\n return c;\n });\n\n this.writer.writeCategoriesDefinitions(serializedCategories);\n };\n\n applyRuntimeMessages = (rootUuid: string, messages: RuntimeMessage[]) => {\n messages.forEach((message) => {\n switch (message.type) {\n case \"metadata\":\n this.#handleMetadataMessage(rootUuid, message.data);\n return;\n case \"step_metadata\":\n this.#handleStepMetadataMessage(rootUuid, message.data);\n return;\n case \"step_start\":\n this.#handleStartStepMessage(rootUuid, message.data);\n return;\n case \"step_stop\":\n this.#handleStopStepMessage(rootUuid, message.data);\n return;\n case \"attachment_content\":\n this.#handleAttachmentContentMessage(rootUuid, message.data);\n return;\n case \"attachment_path\":\n this.#handleAttachmentPathMessage(rootUuid, message.data);\n return;\n case \"global_attachment_content\":\n this.#handleGlobalAttachmentContentMessage(message.data);\n return;\n case \"global_attachment_path\":\n this.#handleGlobalAttachmentPathMessage(message.data);\n return;\n case \"global_error\":\n this.#handleGlobalErrorMessage(message.data);\n return;\n default:\n // eslint-disable-next-line no-console\n console.error(`could not apply runtime messages: unknown message ${JSON.stringify(message)}`);\n return;\n }\n });\n };\n\n applyGlobalRuntimeMessages = (messages: RuntimeMessage[]) => {\n messages.forEach((message) => {\n switch (message.type) {\n case \"global_attachment_content\":\n this.#handleGlobalAttachmentContentMessage(message.data);\n break;\n case \"global_attachment_path\":\n this.#handleGlobalAttachmentPathMessage(message.data);\n break;\n case \"global_error\":\n this.#handleGlobalErrorMessage(message.data);\n break;\n default:\n break;\n }\n });\n };\n\n #handleMetadataMessage = (rootUuid: string, message: RuntimeMetadataMessage[\"data\"]) => {\n // only display name could be set to fixture.\n const fixtureResult = this.state.getWrappedFixtureResult(rootUuid);\n const { links, labels, parameters, displayName, testCaseId, historyId, description, descriptionHtml } = message;\n\n if (fixtureResult) {\n if (displayName) {\n this.updateFixture(rootUuid, (result) => {\n result.name = displayName;\n });\n }\n\n if (historyId) {\n // eslint-disable-next-line no-console\n console.error(\"historyId can't be changed within test fixtures\");\n }\n if (testCaseId) {\n // eslint-disable-next-line no-console\n console.error(\"testCaseId can't be changed within test fixtures\");\n }\n\n if (links || labels || parameters || description || descriptionHtml) {\n // in some frameworks, afterEach methods can be executed before test stop event, while\n // in others after. To remove the possible undetermined behaviour we only allow\n // using runtime metadata API in before hooks.\n if (fixtureResult.type === \"after\") {\n // eslint-disable-next-line no-console\n console.error(\"metadata messages isn't supported for after test fixtures\");\n return;\n }\n\n this.updateScope(fixtureResult.scopeUuid, (scope) => {\n if (links) {\n scope.links = [...scope.links, ...(this.linkConfig ? formatLinks(this.linkConfig, links) : links)];\n }\n if (labels) {\n scope.labels = [...scope.labels, ...labels];\n }\n if (parameters) {\n scope.parameters = [...scope.parameters, ...parameters];\n }\n if (description) {\n scope.description = description;\n }\n if (descriptionHtml) {\n scope.descriptionHtml = descriptionHtml;\n }\n });\n }\n\n return;\n }\n\n this.updateTest(rootUuid, (result) => {\n if (links) {\n result.links = [...result.links, ...(this.linkConfig ? formatLinks(this.linkConfig, links) : links)];\n }\n if (labels) {\n result.labels = [...result.labels, ...labels];\n }\n if (parameters) {\n result.parameters = [...result.parameters, ...parameters];\n }\n if (displayName) {\n result.name = displayName;\n }\n if (testCaseId) {\n result.testCaseId = testCaseId;\n }\n if (historyId) {\n result.historyId = historyId;\n }\n if (description) {\n result.description = description;\n }\n if (descriptionHtml) {\n result.descriptionHtml = descriptionHtml;\n }\n });\n };\n\n #handleStepMetadataMessage = (rootUuid: string, message: RuntimeStepMetadataMessage[\"data\"]) => {\n const stepUuid = this.currentStep(rootUuid);\n if (!stepUuid) {\n // eslint-disable-next-line no-console\n console.error(\"could not handle step metadata message: no step is running\");\n return;\n }\n const { name, parameters } = message;\n this.updateStep(stepUuid, (stepResult) => {\n if (name) {\n stepResult.name = name;\n }\n if (parameters) {\n stepResult.parameters = [...stepResult.parameters, ...parameters];\n }\n });\n };\n\n #handleStartStepMessage = (rootUuid: string, message: RuntimeStartStepMessage[\"data\"]) => {\n this.startStep(rootUuid, undefined, { ...message });\n };\n\n #handleStopStepMessage = (rootUuid: string, message: RuntimeStopStepMessage[\"data\"]) => {\n const stepUuid = this.currentStep(rootUuid);\n if (!stepUuid) {\n // eslint-disable-next-line no-console\n console.error(\"could not handle step stop message: no step is running\");\n return;\n }\n this.updateStep(stepUuid, (result) => {\n if (message.status && !result.status) {\n result.status = message.status;\n }\n if (message.statusDetails) {\n result.statusDetails = { ...result.statusDetails, ...message.statusDetails };\n }\n });\n this.stopStep(stepUuid, { stop: message.stop });\n };\n\n #handleAttachmentContentMessage = (rootUuid: string, message: RuntimeAttachmentContentMessage[\"data\"]) => {\n this.writeAttachment(rootUuid, undefined, message.name, Buffer.from(message.content, message.encoding), {\n encoding: message.encoding,\n contentType: message.contentType,\n fileExtension: message.fileExtension,\n wrapInStep: message.wrapInStep,\n timestamp: message.timestamp,\n });\n };\n\n #handleAttachmentPathMessage = (rootUuid: string, message: RuntimeAttachmentPathMessage[\"data\"]) => {\n this.writeAttachment(rootUuid, undefined, message.name, message.path, {\n contentType: message.contentType,\n fileExtension: message.fileExtension,\n wrapInStep: message.wrapInStep,\n timestamp: message.timestamp,\n });\n };\n\n #handleGlobalAttachmentContentMessage = (message: RuntimeGlobalAttachmentContentMessage[\"data\"]) => {\n const attachmentContent = Buffer.from(message.content, message.encoding);\n const attachmentSource = this.#writeAttachmentFile(attachmentContent, {\n contentType: message.contentType,\n fileExtension: message.fileExtension,\n });\n\n this.#writeGlobals({\n attachments: [this.#createGlobalAttachment(message.name, message.contentType, attachmentSource)],\n errors: [],\n });\n };\n\n #handleGlobalAttachmentPathMessage = (message: RuntimeGlobalAttachmentPathMessage[\"data\"]) => {\n const attachmentSource = this.#writeAttachmentFile(message.path, {\n contentType: message.contentType,\n fileExtension: message.fileExtension ?? extname(message.path),\n });\n\n this.#writeGlobals({\n attachments: [this.#createGlobalAttachment(message.name, message.contentType, attachmentSource)],\n errors: [],\n });\n };\n\n #handleGlobalErrorMessage = (message: RuntimeGlobalErrorMessage[\"data\"]) => {\n this.#writeGlobals({\n attachments: [],\n errors: [{ ...message, timestamp: Date.now() }],\n });\n };\n\n #findParent = (\n rootUuid: string,\n parentStepUuid: string | null | undefined,\n ): FixtureResult | TestResult | StepResult | undefined => {\n const root = this.state.getExecutionItem(rootUuid);\n if (!root) {\n return;\n }\n\n if (parentStepUuid === null) {\n return root;\n } else if (parentStepUuid === undefined) {\n const stepUuid = this.currentStep(rootUuid);\n return stepUuid ? this.state.getStepResult(stepUuid) : root;\n } else {\n return this.state.getStepResult(parentStepUuid);\n }\n };\n\n #writeAttachmentFile = (\n attachmentContentOrPath: Buffer | string,\n options: Pick<AttachmentOptions, \"contentType\" | \"fileExtension\">,\n ) => {\n const isPath = typeof attachmentContentOrPath === \"string\";\n const attachmentFileName = buildAttachmentFileName({\n contentType: options.contentType,\n fileExtension: options.fileExtension,\n });\n\n if (isPath) {\n this.writer.writeAttachmentFromPath(attachmentFileName, attachmentContentOrPath);\n } else {\n this.writer.writeAttachment(attachmentFileName, attachmentContentOrPath);\n }\n\n return attachmentFileName;\n };\n\n #createAttachment = (name: string, contentType: string, source: string): Attachment => ({\n name,\n source,\n type: contentType,\n });\n\n #createGlobalAttachment = (name: string, contentType: string, source: string): Globals[\"attachments\"][number] => ({\n ...this.#createAttachment(name, contentType, source),\n timestamp: Date.now(),\n });\n\n #writeGlobals = (globals: Globals): void => {\n this.writer.writeGlobals(`${randomUuid()}-globals.json`, globals);\n };\n\n #writeFixturesOfScope = ({ fixtures, tests }: TestScope) => {\n const writtenFixtures = new Set<string>();\n if (tests.length) {\n for (const wrappedFixture of fixtures) {\n if (!writtenFixtures.has(wrappedFixture.uuid)) {\n this.#writeContainer(tests, wrappedFixture);\n this.state.deleteFixtureResult(wrappedFixture.uuid);\n writtenFixtures.add(wrappedFixture.uuid);\n }\n }\n }\n };\n\n #writeContainer = (tests: string[], wrappedFixture: FixtureResultWrapper) => {\n const fixture = wrappedFixture.value;\n const befores = wrappedFixture.type === \"before\" ? [wrappedFixture.value] : [];\n const afters = wrappedFixture.type === \"after\" ? [wrappedFixture.value] : [];\n this.writer.writeGroup({\n uuid: wrappedFixture.uuid,\n name: fixture.name,\n children: [...new Set(tests)],\n befores,\n afters,\n });\n };\n\n #calculateTimings = (\n start?: number,\n stop?: number,\n duration?: number,\n ): {\n start?: number;\n stop?: number;\n } => {\n const result: { start?: number; stop?: number } = { start, stop };\n if (duration) {\n const normalisedDuration = Math.max(0, duration);\n if (result.stop !== undefined) {\n result.start = result.stop - normalisedDuration;\n } else if (result.start !== undefined) {\n result.stop = result.start + normalisedDuration;\n } else {\n result.stop = Date.now();\n result.start = result.stop - normalisedDuration;\n }\n } else {\n if (result.stop === undefined) {\n result.stop = Date.now();\n }\n if (result.start === undefined) {\n result.start = result.stop;\n }\n }\n return {\n start: result.start ? Math.round(result.start) : undefined,\n stop: result.stop ? Math.round(result.stop) : undefined,\n };\n };\n}\n"],"mappings":";;;;;;;;;;;AAAA;AACA,OAAOA,IAAI,MAAM,WAAW;AAC5B,SAASC,OAAO,QAAQ,MAAM;AAC9B,SAMEC,KAAK,QAGA,gBAAgB;AAevB,SAASC,cAAc,QAAQ,qBAAqB;AACpD,SAASC,QAAQ,QAAQ,eAAe;AACxC,SAASC,mBAAmB,EAAEC,gBAAgB,EAAEC,gBAAgB,QAAQ,cAAc;AACtF,SAASC,YAAY,QAAQ,eAAe;AAS5C,SAASC,SAAS,EAAEC,WAAW,EAAEC,sBAAsB,EAAEC,uBAAuB,EAAEC,UAAU,QAAQ,YAAY;AAChH,SAASC,uBAAuB,QAAQ,wBAAwB;AAChE,SAASC,aAAa,QAAQ,oBAAoB;AAAC,IAAAC,aAAA,oBAAAC,OAAA;AAAA,IAAAC,wBAAA,oBAAAC,OAAA;AAcnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,iBAAiB,CAAC;EAAAC,YAAA;IAAAC,2BAAA,OAAAJ,wBAAA;IAAAK,eAAA,gBACP,EAAE;IAExBC,0BAAA,OAAAR,aAAa,EAAiB,EAAE;EAAC;EAMjCS,WAAWA,CAA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CAACC,OAAO,CAAC7I,KAAK,CAAC,EAAE;UACxB,OAAOA,KAAK,CAACgG,GAAG,CAAEmD,CAAC,KAAM;YAAEvD,IAAI;YAAE5F,KAAK,EAAEmJ;UAAE,CAAC,CAAC,CAAC;QAC/C;QAEA,OAAO;UACLvD,IAAI;UACJ5F;QACF,CAAC;MACH,CAAC,CAAC;IACJ;EACF;AA8oBF","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","names":["ALLURE_METADATA_CONTENT_TYPE","ALLURE_RUNTIME_MESSAGE_CONTENT_TYPE"],"sources":["../../../../src/sdk/reporter/types.ts"],"sourcesContent":["import type {\n FixtureResult,\n Label,\n LabelName,\n Link,\n LinkType,\n Parameter,\n StepResult,\n TestResult,\n TestResultContainer,\n} from \"../../model.js\";\nimport type { Category, EnvironmentInfo } from \"../types.js\";\n\nexport const ALLURE_METADATA_CONTENT_TYPE = \"application/vnd.allure.metadata+json\";\nexport const ALLURE_RUNTIME_MESSAGE_CONTENT_TYPE = \"application/vnd.allure.message+json\";\n\nexport interface LifecycleListener {\n beforeTestResultStart?: (result: TestResult) => void;\n\n afterTestResultStart?: (result: TestResult) => void;\n\n beforeTestResultStop?: (result: TestResult) => void;\n\n afterTestResultStop?: (result: TestResult) => void;\n\n beforeTestResultUpdate?: (result: TestResult) => void;\n\n afterTestResultUpdate?: (result: TestResult) => void;\n\n beforeTestResultWrite?: (result: TestResult) => void;\n\n afterTestResultWrite?: (result: TestResult) => void;\n\n beforeStepStop?: (result: StepResult) => void;\n\n afterStepStop?: (result: StepResult) => void;\n}\n\nexport type LinkTemplate = string | ((url: string) => string);\n\nexport type LinkTypeOptions = {\n urlTemplate: LinkTemplate;\n nameTemplate?: LinkTemplate;\n};\n\nexport type LinkConfig<TOpts extends LinkTypeOptions = LinkTypeOptions> = Partial<Record<LinkType, TOpts>> &\n Record<string, TOpts>;\n\nexport type WriterDescriptor = [cls: string, ...args: readonly unknown[]] | string;\n\nexport type GlobalLabelsConfig = Partial<Record<LabelName, string | string[]>> & Record<string, string | string[]>;\n\nexport interface ReporterConfig {\n readonly resultsDir?: string;\n readonly links?: LinkConfig;\n readonly globalLabels?: Label[] | GlobalLabelsConfig;\n readonly listeners?: LifecycleListener[];\n readonly environmentInfo?: EnvironmentInfo;\n readonly categories?: Category[];\n}\n\nexport interface ReporterRuntimeConfig extends Omit<ReporterConfig, \"resultsDir\"> {\n readonly writer: Writer | WriterDescriptor;\n}\n\nexport interface Writer {\n writeResult(result: TestResult): void;\n\n writeGroup(result: TestResultContainer): void;\n\n writeAttachment(distFileName: string, content: Buffer): void;\n\n writeAttachmentFromPath(distFileName: string, from: string): void;\n\n writeEnvironmentInfo(info: EnvironmentInfo): void;\n\n writeCategoriesDefinitions(categories: Category[]): void;\n}\n\nexport type TestScope = {\n uuid: string;\n tests: string[];\n fixtures: FixtureResultWrapper[];\n labels: Label[];\n links: Link[];\n parameters: Parameter[];\n description?: string;\n descriptionHtml?: string;\n};\n\nexport type FixtureType = \"before\" | \"after\";\n\nexport type FixtureResultWrapper = {\n uuid: string;\n value: FixtureResult;\n type: FixtureType;\n scopeUuid: string;\n};\n\nexport type TestResultWrapper = {\n value: TestResult;\n scopeUuids: string[];\n};\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"types.js","names":["ALLURE_METADATA_CONTENT_TYPE","ALLURE_RUNTIME_MESSAGE_CONTENT_TYPE"],"sources":["../../../../src/sdk/reporter/types.ts"],"sourcesContent":["import type {\n FixtureResult,\n Globals,\n Label,\n LabelName,\n Link,\n LinkType,\n Parameter,\n StepResult,\n TestResult,\n TestResultContainer,\n} from \"../../model.js\";\nimport type { Category, EnvironmentInfo } from \"../types.js\";\n\nexport const ALLURE_METADATA_CONTENT_TYPE = \"application/vnd.allure.metadata+json\";\nexport const ALLURE_RUNTIME_MESSAGE_CONTENT_TYPE = \"application/vnd.allure.message+json\";\n\nexport interface LifecycleListener {\n beforeTestResultStart?: (result: TestResult) => void;\n\n afterTestResultStart?: (result: TestResult) => void;\n\n beforeTestResultStop?: (result: TestResult) => void;\n\n afterTestResultStop?: (result: TestResult) => void;\n\n beforeTestResultUpdate?: (result: TestResult) => void;\n\n afterTestResultUpdate?: (result: TestResult) => void;\n\n beforeTestResultWrite?: (result: TestResult) => void;\n\n afterTestResultWrite?: (result: TestResult) => void;\n\n beforeStepStop?: (result: StepResult) => void;\n\n afterStepStop?: (result: StepResult) => void;\n}\n\nexport type LinkTemplate = string | ((url: string) => string);\n\nexport type LinkTypeOptions = {\n urlTemplate: LinkTemplate;\n nameTemplate?: LinkTemplate;\n};\n\nexport type LinkConfig<TOpts extends LinkTypeOptions = LinkTypeOptions> = Partial<Record<LinkType, TOpts>> &\n Record<string, TOpts>;\n\nexport type WriterDescriptor = [cls: string, ...args: readonly unknown[]] | string;\n\nexport type GlobalLabelsConfig = Partial<Record<LabelName, string | string[]>> & Record<string, string | string[]>;\n\nexport interface ReporterConfig {\n readonly resultsDir?: string;\n readonly links?: LinkConfig;\n readonly globalLabels?: Label[] | GlobalLabelsConfig;\n readonly listeners?: LifecycleListener[];\n readonly environmentInfo?: EnvironmentInfo;\n readonly categories?: Category[];\n}\n\nexport interface ReporterRuntimeConfig extends Omit<ReporterConfig, \"resultsDir\"> {\n readonly writer: Writer | WriterDescriptor;\n}\n\nexport interface Writer {\n writeResult(result: TestResult): void;\n\n writeGroup(result: TestResultContainer): void;\n\n writeAttachment(distFileName: string, content: Buffer): void;\n\n writeAttachmentFromPath(distFileName: string, from: string): void;\n\n writeEnvironmentInfo(info: EnvironmentInfo): void;\n\n writeCategoriesDefinitions(categories: Category[]): void;\n\n writeGlobals(distFileName: string, info: Globals): void;\n}\n\nexport type TestScope = {\n uuid: string;\n tests: string[];\n fixtures: FixtureResultWrapper[];\n labels: Label[];\n links: Link[];\n parameters: Parameter[];\n description?: string;\n descriptionHtml?: string;\n};\n\nexport type FixtureType = \"before\" | \"after\";\n\nexport type FixtureResultWrapper = {\n uuid: string;\n value: FixtureResult;\n type: FixtureType;\n scopeUuid: string;\n};\n\nexport type TestResultWrapper = {\n value: TestResult;\n scopeUuids: string[];\n};\n"],"mappings":"AAcA,OAAO,IAAMA,4BAA4B,GAAG,sCAAsC;AAClF,OAAO,IAAMC,mCAAmC,GAAG,qCAAqC","ignoreList":[]}
|
|
@@ -33,6 +33,10 @@ export class FileSystemWriter {
|
|
|
33
33
|
var path = this.buildPath("".concat(result.uuid, "-result.json"));
|
|
34
34
|
writeJson(path, result);
|
|
35
35
|
}
|
|
36
|
+
writeGlobals(distFileName, info) {
|
|
37
|
+
var path = this.buildPath(distFileName);
|
|
38
|
+
writeJson(path, info);
|
|
39
|
+
}
|
|
36
40
|
buildPath(name) {
|
|
37
41
|
mkdirSync(this.config.resultsDir, {
|
|
38
42
|
recursive: true
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FileSystemWriter.js","names":["copyFileSync","mkdirSync","writeFileSync","join","stringifyEnvInfo","writeJson","path","data","JSON","stringify","FileSystemWriter","constructor","config","writeAttachment","distFileName","content","buildPath","writeAttachmentFromPath","from","to","writeEnvironmentInfo","info","text","writeCategoriesDefinitions","categories","writeGroup","result","concat","uuid","writeResult","name","resultsDir","recursive"],"sources":["../../../../../src/sdk/reporter/writer/FileSystemWriter.ts"],"sourcesContent":["import { copyFileSync, mkdirSync, writeFileSync } from \"node:fs\";\nimport { join } from \"node:path\";\nimport type { TestResult, TestResultContainer } from \"../../../model.js\";\nimport type { Category, EnvironmentInfo } from \"../../types.js\";\nimport type { Writer } from \"../types.js\";\nimport { stringifyEnvInfo } from \"../utils/envInfo.js\";\n\nconst writeJson = (path: string, data: unknown): void => {\n writeFileSync(path, JSON.stringify(data), \"utf-8\");\n};\n\nexport class FileSystemWriter implements Writer {\n constructor(private config: { resultsDir: string }) {}\n\n writeAttachment(distFileName: string, content: Buffer): void {\n const path = this.buildPath(distFileName);\n\n writeFileSync(path, content, \"utf-8\");\n }\n\n writeAttachmentFromPath(distFileName: string, from: string): void {\n const to = this.buildPath(distFileName);\n\n copyFileSync(from, to);\n }\n\n writeEnvironmentInfo(info: EnvironmentInfo): void {\n const text = stringifyEnvInfo(info);\n const path = this.buildPath(\"environment.properties\");\n\n writeFileSync(path, text);\n }\n\n writeCategoriesDefinitions(categories: Category[]): void {\n const path = this.buildPath(\"categories.json\");\n\n writeJson(path, categories);\n }\n\n writeGroup(result: TestResultContainer): void {\n const path = this.buildPath(`${result.uuid}-container.json`);\n writeJson(path, result);\n }\n\n writeResult(result: TestResult): void {\n const path = this.buildPath(`${result.uuid}-result.json`);\n writeJson(path, result);\n }\n\n private buildPath(name: string): string {\n mkdirSync(this.config.resultsDir, {\n recursive: true,\n });\n return join(this.config.resultsDir, name);\n }\n}\n"],"mappings":"AAAA,SAASA,YAAY,EAAEC,SAAS,EAAEC,aAAa,QAAQ,SAAS;AAChE,SAASC,IAAI,QAAQ,WAAW;AAIhC,SAASC,gBAAgB,QAAQ,qBAAqB;AAEtD,IAAMC,SAAS,GAAGA,CAACC,IAAY,EAAEC,IAAa,KAAW;EACvDL,aAAa,CAACI,IAAI,EAAEE,IAAI,CAACC,SAAS,CAACF,IAAI,CAAC,EAAE,OAAO,CAAC;AACpD,CAAC;AAED,OAAO,MAAMG,gBAAgB,CAAmB;EAC9CC,WAAWA,CAASC,MAA8B,EAAE;IAAA,KAAhCA,MAA8B,GAA9BA,MAA8B;EAAG;EAErDC,eAAeA,CAACC,YAAoB,EAAEC,OAAe,EAAQ;IAC3D,IAAMT,IAAI,GAAG,IAAI,CAACU,SAAS,CAACF,YAAY,CAAC;IAEzCZ,aAAa,CAACI,IAAI,EAAES,OAAO,EAAE,OAAO,CAAC;EACvC;EAEAE,uBAAuBA,CAACH,YAAoB,EAAEI,IAAY,EAAQ;IAChE,IAAMC,EAAE,GAAG,IAAI,CAACH,SAAS,CAACF,YAAY,CAAC;IAEvCd,YAAY,CAACkB,IAAI,EAAEC,EAAE,CAAC;EACxB;EAEAC,oBAAoBA,CAACC,IAAqB,EAAQ;IAChD,IAAMC,IAAI,GAAGlB,gBAAgB,CAACiB,IAAI,CAAC;IACnC,IAAMf,IAAI,GAAG,IAAI,CAACU,SAAS,CAAC,wBAAwB,CAAC;IAErDd,aAAa,CAACI,IAAI,EAAEgB,IAAI,CAAC;EAC3B;EAEAC,0BAA0BA,CAACC,UAAsB,EAAQ;IACvD,IAAMlB,IAAI,GAAG,IAAI,CAACU,SAAS,CAAC,iBAAiB,CAAC;IAE9CX,SAAS,CAACC,IAAI,EAAEkB,UAAU,CAAC;EAC7B;EAEAC,UAAUA,CAACC,MAA2B,EAAQ;IAC5C,IAAMpB,IAAI,GAAG,IAAI,CAACU,SAAS,IAAAW,MAAA,CAAID,MAAM,CAACE,IAAI,oBAAiB,CAAC;IAC5DvB,SAAS,CAACC,IAAI,EAAEoB,MAAM,CAAC;EACzB;EAEAG,WAAWA,CAACH,MAAkB,EAAQ;IACpC,IAAMpB,IAAI,GAAG,IAAI,CAACU,SAAS,IAAAW,MAAA,CAAID,MAAM,CAACE,IAAI,iBAAc,CAAC;IACzDvB,SAAS,CAACC,IAAI,EAAEoB,MAAM,CAAC;EACzB;
|
|
1
|
+
{"version":3,"file":"FileSystemWriter.js","names":["copyFileSync","mkdirSync","writeFileSync","join","stringifyEnvInfo","writeJson","path","data","JSON","stringify","FileSystemWriter","constructor","config","writeAttachment","distFileName","content","buildPath","writeAttachmentFromPath","from","to","writeEnvironmentInfo","info","text","writeCategoriesDefinitions","categories","writeGroup","result","concat","uuid","writeResult","writeGlobals","name","resultsDir","recursive"],"sources":["../../../../../src/sdk/reporter/writer/FileSystemWriter.ts"],"sourcesContent":["import { copyFileSync, mkdirSync, writeFileSync } from \"node:fs\";\nimport { join } from \"node:path\";\nimport type { Globals, TestResult, TestResultContainer } from \"../../../model.js\";\nimport type { Category, EnvironmentInfo } from \"../../types.js\";\nimport type { Writer } from \"../types.js\";\nimport { stringifyEnvInfo } from \"../utils/envInfo.js\";\n\nconst writeJson = (path: string, data: unknown): void => {\n writeFileSync(path, JSON.stringify(data), \"utf-8\");\n};\n\nexport class FileSystemWriter implements Writer {\n constructor(private config: { resultsDir: string }) {}\n\n writeAttachment(distFileName: string, content: Buffer): void {\n const path = this.buildPath(distFileName);\n\n writeFileSync(path, content, \"utf-8\");\n }\n\n writeAttachmentFromPath(distFileName: string, from: string): void {\n const to = this.buildPath(distFileName);\n\n copyFileSync(from, to);\n }\n\n writeEnvironmentInfo(info: EnvironmentInfo): void {\n const text = stringifyEnvInfo(info);\n const path = this.buildPath(\"environment.properties\");\n\n writeFileSync(path, text);\n }\n\n writeCategoriesDefinitions(categories: Category[]): void {\n const path = this.buildPath(\"categories.json\");\n\n writeJson(path, categories);\n }\n\n writeGroup(result: TestResultContainer): void {\n const path = this.buildPath(`${result.uuid}-container.json`);\n writeJson(path, result);\n }\n\n writeResult(result: TestResult): void {\n const path = this.buildPath(`${result.uuid}-result.json`);\n writeJson(path, result);\n }\n\n writeGlobals(distFileName: string, info: Globals): void {\n const path = this.buildPath(distFileName);\n writeJson(path, info);\n }\n\n private buildPath(name: string): string {\n mkdirSync(this.config.resultsDir, {\n recursive: true,\n });\n return join(this.config.resultsDir, name);\n }\n}\n"],"mappings":"AAAA,SAASA,YAAY,EAAEC,SAAS,EAAEC,aAAa,QAAQ,SAAS;AAChE,SAASC,IAAI,QAAQ,WAAW;AAIhC,SAASC,gBAAgB,QAAQ,qBAAqB;AAEtD,IAAMC,SAAS,GAAGA,CAACC,IAAY,EAAEC,IAAa,KAAW;EACvDL,aAAa,CAACI,IAAI,EAAEE,IAAI,CAACC,SAAS,CAACF,IAAI,CAAC,EAAE,OAAO,CAAC;AACpD,CAAC;AAED,OAAO,MAAMG,gBAAgB,CAAmB;EAC9CC,WAAWA,CAASC,MAA8B,EAAE;IAAA,KAAhCA,MAA8B,GAA9BA,MAA8B;EAAG;EAErDC,eAAeA,CAACC,YAAoB,EAAEC,OAAe,EAAQ;IAC3D,IAAMT,IAAI,GAAG,IAAI,CAACU,SAAS,C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AChCC,SAAS,EAAE;IACb,CAAC,CAAC;IACF,OAAO9B,IAAI,CAAC,IAAI,CAACS,MAAM,CAACoB,UAAU,EAAED,IAAI,CAAC;EAC3C;AACF","ignoreList":[]}
|
|
@@ -9,6 +9,7 @@ export class InMemoryWriter {
|
|
|
9
9
|
_defineProperty(this, "attachments", {});
|
|
10
10
|
_defineProperty(this, "categories", void 0);
|
|
11
11
|
_defineProperty(this, "envInfo", void 0);
|
|
12
|
+
_defineProperty(this, "globals", void 0);
|
|
12
13
|
}
|
|
13
14
|
writeGroup(result) {
|
|
14
15
|
this.groups.push(result);
|
|
@@ -28,5 +29,10 @@ export class InMemoryWriter {
|
|
|
28
29
|
writeEnvironmentInfo(envInfo) {
|
|
29
30
|
this.envInfo = envInfo;
|
|
30
31
|
}
|
|
32
|
+
writeGlobals(distFileName, info) {
|
|
33
|
+
var _this$globals;
|
|
34
|
+
this.globals = (_this$globals = this.globals) !== null && _this$globals !== void 0 ? _this$globals : {};
|
|
35
|
+
this.globals[distFileName] = info;
|
|
36
|
+
}
|
|
31
37
|
}
|
|
32
38
|
//# sourceMappingURL=InMemoryWriter.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InMemoryWriter.js","names":["readFileSync","InMemoryWriter","constructor","_defineProperty","writeGroup","result","groups","push","writeResult","tests","writeAttachment","distFileName","content","attachments","writeAttachmentFromPath","from","writeCategoriesDefinitions","categories","writeEnvironmentInfo","envInfo"],"sources":["../../../../../src/sdk/reporter/writer/InMemoryWriter.ts"],"sourcesContent":["import { readFileSync } from \"fs\";\nimport type { TestResult, TestResultContainer } from \"../../../model.js\";\nimport type { AllureResults, Category, EnvironmentInfo } from \"../../types.js\";\nimport type { Writer } from \"../types.js\";\n\nexport class InMemoryWriter implements Writer, AllureResults {\n public groups: TestResultContainer[] = [];\n public tests: TestResult[] = [];\n public attachments: Record<string, Buffer> = {};\n public categories?: Category[];\n public envInfo?: Record<string, string | undefined>;\n\n public writeGroup(result: TestResultContainer): void {\n this.groups.push(result);\n }\n\n public writeResult(result: TestResult): void {\n this.tests.push(result);\n }\n\n public writeAttachment(distFileName: string, content: Buffer): void {\n this.attachments[distFileName] = content;\n }\n\n public writeAttachmentFromPath(distFileName: string, from: string): void {\n this.attachments[distFileName] = readFileSync(from);\n }\n\n public writeCategoriesDefinitions(categories: Category[]): void {\n this.categories = categories;\n }\n\n public writeEnvironmentInfo(envInfo: EnvironmentInfo): void {\n this.envInfo = envInfo;\n }\n}\n"],"mappings":";;;AAAA,SAASA,YAAY,QAAQ,IAAI;AAKjC,OAAO,MAAMC,cAAc,CAAkC;EAAAC,YAAA;IAAAC,eAAA,iBACpB,EAAE;IAAAA,eAAA,gBACZ,EAAE;IAAAA,eAAA,sBACc,CAAC,CAAC;IAAAA,eAAA;IAAAA,eAAA;EAAA;
|
|
1
|
+
{"version":3,"file":"InMemoryWriter.js","names":["readFileSync","InMemoryWriter","constructor","_defineProperty","writeGroup","result","groups","push","writeResult","tests","writeAttachment","distFileName","content","attachments","writeAttachmentFromPath","from","writeCategoriesDefinitions","categories","writeEnvironmentInfo","envInfo","writeGlobals","info","_this$globals","globals"],"sources":["../../../../../src/sdk/reporter/writer/InMemoryWriter.ts"],"sourcesContent":["import { readFileSync } from \"fs\";\nimport type { Globals, TestResult, TestResultContainer } from \"../../../model.js\";\nimport type { AllureResults, Category, EnvironmentInfo } from \"../../types.js\";\nimport type { Writer } from \"../types.js\";\n\nexport class InMemoryWriter implements Writer, AllureResults {\n public groups: TestResultContainer[] = [];\n public tests: TestResult[] = [];\n public attachments: Record<string, Buffer> = {};\n public categories?: Category[];\n public envInfo?: Record<string, string | undefined>;\n public globals?: Record<string, Globals>;\n\n public writeGroup(result: TestResultContainer): void {\n this.groups.push(result);\n }\n\n public writeResult(result: TestResult): void {\n this.tests.push(result);\n }\n\n public writeAttachment(distFileName: string, content: Buffer): void {\n this.attachments[distFileName] = content;\n }\n\n public writeAttachmentFromPath(distFileName: string, from: string): void {\n this.attachments[distFileName] = readFileSync(from);\n }\n\n public writeCategoriesDefinitions(categories: Category[]): void {\n this.categories = categories;\n }\n\n public writeEnvironmentInfo(envInfo: EnvironmentInfo): void {\n this.envInfo = envInfo;\n }\n\n public writeGlobals(distFileName: string, info: Globals): void {\n this.globals = this.globals ?? {};\n this.globals[distFileName] = info;\n }\n}\n"],"mappings":";;;AAAA,SAASA,YAAY,QAAQ,IAAI;AAKjC,OAAO,MAAMC,cAAc,CAAkC;EAAAC,YAAA;IAAAC,eAAA,iBACpB,EAAE;IAAAA,eAAA,gBACZ,EAAE;IAAAA,eAAA,sBACc,CAAC,CAAC;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA;EAAA;EAKxCC,UAAUA,CAACC,MAA2B,EAAQ;IACnD,IAAI,CAACC,MAAM,CAACC,IAAI,CAACF,MAAM,CAAC;EAC1B;EAEOG,WAAWA,CAACH,MAAkB,EAAQ;IAC3C,IAAI,CAACI,KAAK,CAACF,IAAI,CAACF,MAAM,CAAC;EACzB;EAEOK,eAAeA,CAACC,YAAoB,EAAEC,OAAe,EAAQ;IAClE,IAAI,CAACC,WAAW,CAACF,YAAY,CAAC,GAAGC,OAAO;EAC1C;EAEOE,uBAAuBA,CAACH,YAAoB,EAAEI,IAAY,EAAQ;IACvE,IAAI,CAACF,WAAW,CAACF,YAAY,CAAC,GAAGX,YAAY,CAACe,IAAI,CAAC;EACrD;EAEOC,0BAA0BA,CAACC,UAAsB,EAAQ;IAC9D,IAAI,CAACA,UAAU,GAAGA,UAAU;EAC9B;EAEOC,oBAAoBA,CAACC,OAAwB,EAAQ;IAC1D,IAAI,CAACA,OAAO,GAAGA,OAAO;EACxB;EAEOC,YAAYA,CAACT,YAAoB,EAAEU,IAAa,EAAQ;IAAA,IAAAC,aAAA;IAC7D,IAAI,CAACC,OAAO,IAAAD,aAAA,GAAG,IAAI,CAACC,OAAO,cAAAD,aAAA,cAAAA,aAAA,GAAI,CAAC,CAAC;IACjC,IAAI,CAACC,OAAO,CAACZ,YAAY,CAAC,GAAGU,IAAI;EACnC;AACF","ignoreList":[]}
|