Skip to content

Commit

Permalink
Merge pull request #103 from Shelex/refactor/decouple_reporter_internals
Browse files Browse the repository at this point in the history
Refactor/decouple reporter internals
  • Loading branch information
Shelex authored Nov 21, 2021
2 parents f41fd6a + ccb1b41 commit 5833d53
Show file tree
Hide file tree
Showing 8 changed files with 1,308 additions and 1,371 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
/**
* A lot of credit to Sergey Korol <serhii.s.korol@gmail.com> who made
* Allure-mocha reporter: "https://github.com/allure-framework/allure-js/tree/master/packages/allure-mocha"
*/

const {
Allure,
Status,
Expand Down Expand Up @@ -63,9 +58,7 @@ Allure.prototype.step = function (name, isParent = true) {

Allure.prototype.stepStart = function (name) {
// define last chainer that still not finished and has allure step
const chainer = this.reporter.commands
.reverse()
.find((c) => !c.finished && c.step && c.step.info.name);
const chainer = this.reporter.cy.chain.getLatestWithStep();

// define fallback allure executable
const previousExecutable = this.currentExecutable;
Expand Down
Loading

0 comments on commit 5833d53

Please sign in to comment.