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
Describe the bug before() and after() are designed so that there can be only one before and after in a test suite, and it needs to have a function as an argument. Passing no parameters should be considered invalid, as well as having more than one declaration.
Version(s) affected
v5.1.0
To Reproduce
Run a test suite with the following content:
const{ suite, before }=require('@pmoo/testy');suite('wrong!',()=>{before();before();});
Expected behavior
Raise an error because of two reasons:
Describe the bug
before()
andafter()
are designed so that there can be only one before and after in a test suite, and it needs to have a function as an argument. Passing no parameters should be considered invalid, as well as having more than one declaration.Version(s) affected
v5.1.0
To Reproduce
Run a test suite with the following content:
Expected behavior
Raise an error because of two reasons:
before()
should receive a function (reported here: [bug] before() and after() argument is not validated #227)before()
per suite is not allowed (there's a validation in place but it's not catching this particular case)The text was updated successfully, but these errors were encountered: