diff --git a/lib/recorder.js b/lib/recorder.js index b5761fa7f..f30e8f80c 100644 --- a/lib/recorder.js +++ b/lib/recorder.js @@ -94,7 +94,8 @@ module.exports = { oldPromises = []; tasks = []; this.session.running = false; - this.retries = []; + // reset this retries makes the retryFailedStep plugin won't work if there is Before/BeforeSuit block due to retries is undefined on Scenario + // this.retries = []; }, /** diff --git a/test/unit/plugin/retryFailedStep_test.js b/test/unit/plugin/retryFailedStep_test.js index 7aba20c6c..721aeadd9 100644 --- a/test/unit/plugin/retryFailedStep_test.js +++ b/test/unit/plugin/retryFailedStep_test.js @@ -9,6 +9,7 @@ const recorder = require('../../../lib/recorder'); describe('retryFailedStep', () => { beforeEach(() => { + recorder.retries = []; container.clear({ mock: { _session: () => {},