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(await-fire-event): reference correct method names in reported messages #591

Merged
merged 2 commits into from
May 25, 2022

Conversation

IvanAprea
Copy link
Contributor

@IvanAprea IvanAprea commented May 20, 2022

Checks

  • I have read the contributing guidelines.
  • If some rule is added/updated/removed, I've regenerated the rules list (npm run generate:rules-list)
  • If some rule meta info is changed, I've regenerated the plugin shared configs (npm run generate:configs)

Changes

Issue link: #590

  • I changed the awaitFireEvent prop from "methodName" to "name"
  • I changed the fireEventWrapper prop from "wrapperName" to "name"
  • I fixed the fireEventWrapper test in order to use the wrapper function name, and no the fire event function name.

image
image

I am showing the errors with gitLens

Context

@IvanAprea
Copy link
Contributor Author

@Belco90 👀

Copy link
Member

@Belco90 Belco90 left a comment

Choose a reason for hiding this comment

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

Thanks for taking care of this!

I think we need to do the change in the other message. Additionally, can you update the tests for this rule so they check that the correponding name property is passed to the messages?

lib/rules/await-fire-event.ts Outdated Show resolved Hide resolved
@IvanAprea
Copy link
Contributor Author

@Belco90 I did another commit with the changes for the messageId: fireEventWrapper. I changed the var to name and fixed the test in order to use the wrapper function name. I saw the rest of tests and i think that they are well. The tests didnt fail before because the var name in the messages was wrong. Please let me know if you have any doubt or if you need that i test anymore

Copy link
Member

@Belco90 Belco90 left a comment

Choose a reason for hiding this comment

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

Looks great! Thanks for your contribution 👌

It's annoying that tests weren't failing for an unexpected data property provided, we will have to look into how to prevent this in the future.

@Belco90 Belco90 changed the title [ISSUE-509] show wait-fire-event correctly fix(await-fire-event): reference correct method names in reported messages May 25, 2022
@Belco90 Belco90 merged commit 763df6e into testing-library:main May 25, 2022
@github-actions
Copy link

🎉 This PR is included in version 5.5.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@Belco90
Copy link
Member

Belco90 commented May 25, 2022

@all-contributors please add @IvanAprea for code and tests

@allcontributors
Copy link
Contributor

@Belco90

I've put up a pull request to add @IvanAprea! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants