-
Notifications
You must be signed in to change notification settings - Fork 145
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
feat: add support for @marko/testing-library
#572
Conversation
@marko/testing-library
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @PrashantAshok! Thanks for your contribution. There are a few things missing tho:
- Update the README with a new label for Marko testing framework
- Since rules meta have changed, the plugin shared configs must be regenerated
- We should add some tests to the
fake-rule.ts
to make sure that@marko/testing-library
is correctly reported as a Testing Library framework
@PrashantAshok Can you please add extra test cases for each rule, so we can see that all rules are still working? |
@Belco90 @MichaelDeBoey - thanks for the review. I missed updating README, let me update that along with the tests.
Sorry, I didn't get this point. How do I generate one? Did you mean the files under
Sorry, any pointers on how would I go about verifying it? And is it some other file, since |
Do I need to add tests for every rule or just the ones that is specific to Marko, e.g. |
@PrashantAshok Each rule should have some basic framework-specific tests to see that the rule works as expected, even if it's not doing anything "special". Not all rules have them currently, but it would be good to start doing it anyways. |
Writing tests for Marko on each rule shouldn't be necessary! We actually haven't read a test for each testing framework on each rule. Adding some tests in |
How would we even know 100% certain that all rules are actually working properly for the plugin? |
In the same way as we do with the rest of the testing frameworks: assuming it works as expected by testing the core utils from |
@Belco90 Well, that's what I think we should stop doing: assuming. Supporting a new testing framework is the perfect opportunity to start really testing that all rules work on this framework. |
Ok, let's cover the rules that are specific for Marko then.
Sorry @PrashantAshok, I thought this was covered in the CONTRIBUTING.md, but it's not! You can regenerate this with To summarize the changes needed:
|
Thanks @Belco90 for detailed suggestions. Points 1, 2 and 3 are done and pushed. Please have a look. (Currently there is no icon for Marko in simple-icons repo, have created an issue. Have 2 options for now - either we can render the icon without the logo Or I can create link with the entire svg file, but this would be too long. Let me know and I can update the draft PR accordingly) Sure, I can add them. But sorry, I maybe missing something, are the current rule related tests dependent on any framework? For e.g. for this test case, the tests still pass if I pass in a random name
|
Let's do it without logo, that's fine.
There are some in specific rules, but we usually use just |
@Belco90 @MichaelDeBoey - all the suggested changed done and pushed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks good at first sight, but I want to review it later again, just in case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just detected 2 tests files missing an invalid test for Marko. When that's done, it should be ready to go!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
🎉 This PR is included in version 5.5.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
@all-contributors please add @PrashantAshok for code, tests |
I've put up a pull request to add @PrashantAshok! 🎉 |
Checks
Changes
@marko/testing-library
to the list of supported testing library frameworksContext
As suggested in #80