Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: JsDoc: Remove promise from Actor.say #3535

Merged
merged 1 commit into from Feb 12, 2023

Conversation

danielrentz
Copy link
Contributor

The return type of Actor.say contains Promise<any>. In TypeScript code, with the ESLint rule "@typescript-eslint/no-floating-promises" this causes lint errors for every I.say in the tests stating that a promise will not be awaited. Instead, add a comment similar to many other methods (I.see, I.click, ...) and leave the return type void.

Motivation/Description of the PR

  • Description of this PR, which problem it solves
  • Resolves #issueId (if applicable).

Applicable helpers:

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

Applicable plugins:

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

Type of change

  • 馃敟 Breaking changes
  • 馃殌 New functionality
  • 馃悰 Bug fix
  • 馃搵 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)

The return type of `Actor.say` contains `Promise<any>`. In TypeScript code, with the ESLint rule "@typescript-eslint/no-floating-promises" this causes lint errors for every `I.say` in the tests stating that a promise will not be awaited.
Instead, add a comment similar to many other methods (`I.see`, `I.click`, ...) and leave the return type `void`.
@danielrentz danielrentz changed the title JsDoc: Remove promise from Actor.say fix: JsDoc: Remove promise from Actor.say Dec 14, 2022
@DavertMik DavertMik merged commit ac92fe5 into codeceptjs:3.x Feb 12, 2023
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.

None yet

3 participants