Replies: 2 comments 1 reply
-
I stumble and make this mistake semi-frequently. Having an error thrown, or the ability to lint against this issue, would be a fantastic improvement. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Consider opening an enhancement issue. Team members usually filter issues there to see what is needed. I didn't even know there was a discussion about this. I personally think that it would be a good idea to throw an error in such cases. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I understand that nesting
test()
functions is not a recommended practice and that they should not be executed. However, I believe it would be beneficial to have a runtime error or a message indicating that the nestedtest()
was not executed. Without such a message, users might mistakenly believe that the nested test has passed.For example, consider the following code:
In this case, the nested
test('bbb', ...)
function is not executed, but there is no warning or error message to inform the user.This issue is particularly noticeable when using
test.each
, as it is visually easy to accidentally placetest.each
inside anothertest()
if they are indented similarly.Consider another example with
test.each
:In this second example, the
test.each
function is not executed because it is nested inside anothertest()
, but there is no warning or error message to inform the user. It would be helpful to provide some feedback to the user when this situation occurs, even though they should not be nestingtest()
functions in the first place.Beta Was this translation helpful? Give feedback.
All reactions