From ef39e9b31aa43580daefbd45fa24851941a23df4 Mon Sep 17 00:00:00 2001 From: kobenguyent Date: Thu, 30 Nov 2023 06:05:33 +0100 Subject: [PATCH] fix: typo in retries env var --- lib/helper/Playwright.js | 2 +- lib/helper/Puppeteer.js | 2 +- lib/plugin/retryFailedStep.js | 2 +- test/unit/plugin/retryFailedStep_test.js | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/helper/Playwright.js b/lib/helper/Playwright.js index 91a4aa5f8..c8dad074a 100644 --- a/lib/helper/Playwright.js +++ b/lib/helper/Playwright.js @@ -474,7 +474,7 @@ class Playwright extends Helper { async _before(test) { this.currentRunningTest = test; recorder.retry({ - retries: process.env.FAILED_STEP_RETIRES || 3, + retries: process.env.FAILED_STEP_RETRIES || 3, when: err => { if (!err || typeof (err.message) !== 'string') { return false; diff --git a/lib/helper/Puppeteer.js b/lib/helper/Puppeteer.js index f234015dd..b3f6f05e5 100644 --- a/lib/helper/Puppeteer.js +++ b/lib/helper/Puppeteer.js @@ -297,7 +297,7 @@ class Puppeteer extends Helper { this.sessionPages = {}; this.currentRunningTest = test; recorder.retry({ - retries: process.env.FAILED_STEP_RETIRES || 3, + retries: process.env.FAILED_STEP_RETRIES || 3, when: err => { if (!err || typeof (err.message) !== 'string') { return false; diff --git a/lib/plugin/retryFailedStep.js b/lib/plugin/retryFailedStep.js index 7c5a51396..528e314d8 100644 --- a/lib/plugin/retryFailedStep.js +++ b/lib/plugin/retryFailedStep.js @@ -118,7 +118,7 @@ module.exports = (config) => { event.dispatcher.on(event.test.before, (test) => { if (test && test.disableRetryFailedStep) return; // disable retry when a test is not active // this env var is used to set the retries inside _before() block of helpers - process.env.FAILED_STEP_RETIRES = config.retries; + process.env.FAILED_STEP_RETRIES = config.retries; recorder.retry(config); }); }; diff --git a/test/unit/plugin/retryFailedStep_test.js b/test/unit/plugin/retryFailedStep_test.js index b47475391..a81953ba1 100644 --- a/test/unit/plugin/retryFailedStep_test.js +++ b/test/unit/plugin/retryFailedStep_test.js @@ -55,7 +55,7 @@ describe('retryFailedStep', () => { await recorder.catchWithoutStop((err) => err); } - expect(process.env.FAILED_STEP_RETIRES).to.equal('1'); + expect(process.env.FAILED_STEP_RETRIES).to.equal('1'); // expects to retry only once counter.should.equal(2); });