Skip to content

Commit

Permalink
remove cypress config parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
epszaw committed Apr 4, 2024
1 parent 46983b2 commit 675f141
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions packages/allure-cypress/src/reporter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export class AllureCypress {
});
}

attachToCypress(on: Cypress.PluginEvents, config?: Cypress.Config) {
attachToCypress(on: Cypress.PluginEvents) {
on("task", {
allureReportTest: ({ testFileAbsolutePath, startMessage, endMessage, messages }: ReportFinalMessage) => {
const currentTests = this.currentTestsByAbsolutePath.get(testFileAbsolutePath) || [];
Expand Down Expand Up @@ -184,14 +184,10 @@ export class AllureCypress {
}
}

export const allureCypress = (
on: Cypress.PluginEvents,
cypressConfig: Cypress.Config,
allureConfig?: AllureCypressConfig,
) => {
export const allureCypress = (on: Cypress.PluginEvents, allureConfig?: AllureCypressConfig) => {
const allureCypressReporter = new AllureCypress(allureConfig);

allureCypressReporter.attachToCypress(on, cypressConfig);
allureCypressReporter.attachToCypress(on);

on("after:spec", (spec, result) => {
allureCypressReporter.endSpec(spec, result);
Expand Down

0 comments on commit 675f141

Please sign in to comment.