You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add a lint rule to help prevent the use of t.expect() in a before or after hook function
Problem
It is too easy to add an expect into a before hook as both a test and a before hook use the TestController as a base object. It is frustrating to teach new members to the project proper testing form and it could be easily prevented.
The goal would be to create a lint error that would notify the developer inside of their IDE or at least flag on lint so it can be identified before pushed into source control.
Feature Request
Add a lint rule to help prevent the use of
t.expect()
in a before or after hook functionProblem
It is too easy to add an expect into a before hook as both a test and a before hook use the TestController as a base object. It is frustrating to teach new members to the project proper testing form and it could be easily prevented.
The goal would be to create a lint error that would notify the developer inside of their IDE or at least flag on lint so it can be identified before pushed into source control.
Expected behavior
Should return an error on line 3, highlighting the
expect(foo)
.The text was updated successfully, but these errors were encountered: