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
Painless already has beforeEach() and afterEach(), but for some cases before/after are preferable. For example I'm writing some integration tests, and I want to spin up an http server before the test group, and then close it when all the tests have run. Starting/stopping with every test slows down the tests considerably.
Does this sound like a worthwhile feature addition?
The text was updated successfully, but these errors were encountered:
So I realized after creating this issue that tests are executed in the order they're written. So while before() and after() are not available, you can "fake" them with something like:
const{createGroup}=require('painless')consttest=createGroup()test('setup',(done)=>{// Do test setup heredone()})// real tests happen heretest('teardown',(done)=>{// do teardown stuff heredone()})
Leaving this open so others can chime in, but this is working for me for the time being.
Painless already has beforeEach() and afterEach(), but for some cases before/after are preferable. For example I'm writing some integration tests, and I want to spin up an http server before the test group, and then close it when all the tests have run. Starting/stopping with every test slows down the tests considerably.
Does this sound like a worthwhile feature addition?
The text was updated successfully, but these errors were encountered: