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
I would love to have a short syntax to re-use the response of the previous request in another test case:
describe('ServiceStack hello',function(){it.seq('Get some data',function(data,done){request('http://localhost').get('/hello').set('Accept','application/json').expect({Id: 5}).expect(200,done);});it.seq('Should have data',function(data,done){request('http://localhost').get('/hello/'+data.Id)//Use data from previous request.set('Accept','application/json').expect(200,done);});});
Ok, I extended https://github.com/Arxisos/trestle and now I don't think anymore that it is a good idea to provide such an easy way to have state in tests.
Therefore I don't propose a PR anymore. The ones who really need state (for acceptance/integration tests) should use a library like mine or implement something themselves.
I would love to have a short syntax to re-use the response of the previous request in another test case:
... á la https://github.com/Arxisos/trestle
What do you think about that? Does it make sense to integrate that into supertest or mocha?
The text was updated successfully, but these errors were encountered: