Skip to content

Conversation

lin-brian-l
Copy link
Collaborator

@lin-brian-l lin-brian-l commented Sep 13, 2024

Motivation/Description of the PR

This PR causes failures from run-rerun to be thrown. After some testing, the existing code in run-rerun will exit with an error code of 1 if the last-executed test fails but I wasn't able to pinpoint why exit code 1 wasn't being thrown if the first test (or any other test than the last one) failed.

Note: I've also made a PR on the CodeceptJS repo. However, I made a separate branch because I didn't want to commit the typing files in the branch I have for that PR.

Applicable helpers:

  • Playwright
  • Puppeteer
  • WebDriver
  • REST
  • FileHelper
  • Appium
  • TestCafe

Applicable plugins:

  • allure
  • autoDelay
  • autoLogin
  • customLocator
  • pauseOnFail
  • coverage
  • retryFailedStep
  • screenshotOnFail
  • selenoid
  • stepByStepReport
  • stepTimeout
  • wdio
  • subtitles

Type of change

  • 🔥 Breaking changes
  • 🚀 New functionality
  • 🐛 Bug fix
  • 🧹 Chore
  • 📋 Documentation changes/updates
  • ♨️ Hot fix
  • 🔨 Markdown files fix - not related to source code
  • 💅 Polish code

Checklist:

  • Tests have been added
  • Documentation has been added (Run npm run docs)
  • Lint checking (Run npm run lint)
  • Local tests are passed (Run npm test)

Comment on lines -24 to -25
typings/types.d.ts
typings/promiseBasedTypes.d.ts No newline at end of file
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Annoyingly, TSLint was failing because these files weren't committed to the repo 🙃.

await this.runTests(test);
} catch (e) {
output.error(e.stack);
throw e;
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the actual fix, which causes the run-rerun command to properly set the exit code to 1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant