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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix types resolution for expect-puppeteer #599

Merged
merged 1 commit into from
Oct 10, 2024

Conversation

mulekick
Copy link
Contributor

@mulekick mulekick commented Oct 7, 2024

Summary

This pull request contains :

  1. A refactoring of the expect-puppeteer types so that types resolution for the puppeteer matchers work in Typescript (issue 598).
  2. Additional type assertions on the Error objects in the tests to eliminate any types and comply to @typescript-eslint/recommended.
  3. A few upgrades of deprecated methods on the puppeteer API (see resetBrowser.test.ts).
  4. An update on the main README to reflect the changes.

Test plan

  1. No breaking changes or regressions should occur since the implementation was left untouched, only types declarations were changed.
  2. Test suite passes 100%.

Test suite results

  1. When testing the minimal repo with the following dependencies :

Current version

  1. Typescript complains, types resolution does not work

VSCode complains

  1. Then changing dependencies to point to my fork, adding @types/jest and npm i :

Pull request version

  1. Typescript is ok and types resolution works again 👍

VSCode OK

@gregberge gregberge merged commit 37e3271 into argos-ci:main Oct 10, 2024
3 checks passed
@gregberge
Copy link
Member

Great, thanks for that!

@mulekick mulekick deleted the my_branch branch October 10, 2024 17:31
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