Skip to content

Commit

Permalink
style fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
kobenguyent committed Dec 10, 2024
1 parent 7034e9a commit 3da12f5
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions packages/allure-codeceptjs/src/reporter.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import { event, recorder } from "codeceptjs";
// @ts-ignore
import { maskSensitiveData } from "invisi-data";
import type * as Mocha from "mocha";
import { env } from "node:process";
import { LabelName, Stage, Status, type StepResult } from "allure-js-commons";
import { getMessageAndTraceFromError, getStatusFromError, isMetadataTag } from "allure-js-commons/sdk";
import AllureMochaReporter from "allure-mocha";
import type { CodeceptError, CodeceptStep } from "./model.js";
import { maskSensitiveData } from "invisi-data";

export class AllureCodeceptJsReporter extends AllureMochaReporter {
constructor(runner: Mocha.Runner, opts: Mocha.MochaOptions, isInWorker: boolean) {
Expand Down Expand Up @@ -49,7 +50,10 @@ export class AllureCodeceptJsReporter extends AllureMochaReporter {
this.runtime.startStep(root, undefined, {
name: `${step.actor} ${step.name}`,
// @ts-ignore
parameters: step.args?.map((arg, index) => ({ name: `arg${index}`, value: `${ global.maskSensitiveData ? maskSensitiveData(JSON.stringify(arg)) : JSON.stringify(arg)}` })),
parameters: step.args?.map((arg, index) => ({
name: `arg${index}`,
value: `${global.maskSensitiveData ? maskSensitiveData(JSON.stringify(arg)) : JSON.stringify(arg)}`,
})),
});
}

Expand Down

0 comments on commit 3da12f5

Please sign in to comment.