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

"Test has no assertions" lint rule is very annoying when writing tests #67185

Closed
talldan opened this issue Nov 21, 2024 · 2 comments · Fixed by #67222
Closed

"Test has no assertions" lint rule is very annoying when writing tests #67185

talldan opened this issue Nov 21, 2024 · 2 comments · Fixed by #67222
Labels
Developer Experience Ideas about improving block and theme developer experience [Status] In Progress Tracking issues with work in progress [Type] Automated Testing Testing infrastructure changes impacting the execution of end-to-end (E2E) and/or unit tests.

Comments

@talldan
Copy link
Contributor

talldan commented Nov 21, 2024

The "Test has no assertions" lint rule makes it very hard to see what you're doing when you're in the process of writing tests:

I haven't gotten to the point where I want to add an assertion yet. There are squigly yellow lines everywhere! I should be able to add assertions in my own time.

This might depend on the IDE/plugins being used, but I think my setup is a pretty standard one.

I'd suggest disabling this unless it can be improved as it's a bad experience for contributors. For me, this discourages writing tests.

@talldan talldan added [Type] Automated Testing Testing infrastructure changes impacting the execution of end-to-end (E2E) and/or unit tests. Developer Experience Ideas about improving block and theme developer experience labels Nov 21, 2024
@Mamaduka
Copy link
Member

100%. This was super annoying when I was migrating tests to Playwright. Sure, you can start a simple test with assertion, but that's rarely the case in this project.

@manzoorwanijk
Copy link
Contributor

It was fixed in jest-community/eslint-plugin-jest#1452.

I have created #67222 to update the package and fix the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Developer Experience Ideas about improving block and theme developer experience [Status] In Progress Tracking issues with work in progress [Type] Automated Testing Testing infrastructure changes impacting the execution of end-to-end (E2E) and/or unit tests.
Projects
None yet
3 participants