Skip to content

Conversation

danielrentz
Copy link
Contributor

@danielrentz danielrentz commented Sep 22, 2025

Motivation/Description of the PR

  • fixed typo in @example documentation of effects/retryTo

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)

@kobenguyent
Copy link
Collaborator

@danielrentz may you please run this to make sure the docs are updated as well?

  • Documentation has been added (Run npm run docs)

@kobenguyent kobenguyent requested a review from Copilot September 23, 2025 08:55
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes a typo in the JSDoc example documentation for the retryTo function in lib/effects.js. The example was incorrectly importing hopeThat instead of retryTo.

  • Corrected the import statement in the @example documentation to properly reference retryTo

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@danielrentz
Copy link
Contributor Author

danielrentz commented Sep 23, 2025

@kobenguyent
This is my experience with running the scripts suggested in CONTRIBUTING.md:

Documentation

> npm install
...
> npm run docs
...
./codeceptjs/runok.js:339
    for (const method of webdriverDoc[0].members.instance) {
                                         ^
TypeError: Cannot read properties of undefined (reading 'members')
    at Object.docsAppium (./codeceptjs/runok.js:339:42)
    at async Object.docsHelpers (./codeceptjs/runok.js:245:9)
    at async Promise.all (index 0)
    at async Object.docs (./codeceptjs/runok.js:29:5)

leaves a locally modified docs/helpers/Appium.md.

Typings

> npm run def

does not modify anything.

Now, running "docs" again will succeed.

> npm run docs
...
> git status

leaves a locally modified docs/plugins.md with obviously unrelated changes. Appium.md returned to original state.

Btw, the exception in the initial "docs" script seems to happen only in a freshly cloned repository, later runs will succeed, even after resetting all changed files.

Testing

> mocha test/unit
bash: mocha: command not found

Seems the CONTRIBUTING.md file needs some updates.

The PR checklist suggests npm test instead:

> npm test

gives weird console outputs such as

[object Object]]     [140]  Starting recording promises

and failing tests such as

  1) MochawesomeHelper with retries
       "before each" hook for "should add context to the correct test object when test is retried":
     Error: Cannot find module 'mochawesome/addContext'
Require stack:
- ./codeceptjs/lib/helper/Mochawesome.js

Conclusion

The initial change in this PR does not lead to any documentation updates. Seems the documentation for the effects functions (docs/effects.md) has been created manually, and contains different example code.

Do you want me to commit the updated docs/plugins.md with this PR?

@kobenguyent
Copy link
Collaborator

The initial change in this PR does not lead to any documentation updates. Seems the documentation for the effects functions (docs/effects.md) has been created manually, and contains different example code.

@danielrentz thanks! then all good.

@kobenguyent kobenguyent merged commit 9cf209c into codeceptjs:3.x Sep 24, 2025
16 of 18 checks passed
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.

2 participants