question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Feature: chaining

See original GitHub issue

It would be awesome to be able to do this:

request(app)
  .get('/signin')
  .expect(200)
  .post('/signin')
  .send({ user: 'foo', pass: 'bar' })
  .expect(200)
  // ...etc...

Issue Analytics

  • State:closed
  • Created 11 years ago
  • Comments:18 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
pirannacommented, Feb 16, 2018

Has there been any improvement regarding chaining? I’m having a similar code than @tj and I think it would be useful to be able to chain requests if you need to do several of them without needed to check for failure for each of them but instead doing so globally… 😕

1reaction
emostarcommented, Aug 18, 2012

@stereosteve This is a quick hack, but to get cookie support you can do something like this:

   describe('for logged in user', function() {
      var cookie

      beforeEach(function(done) {
        request(app)
          .post('/auth/login')
          .send(fixture.User.test)
          .expect(200)
          .end(function(err, res) {
            cookie = res.headers['set-cookie']
            done()
          })
      })

      it('should get a token', function(done) {
        request(app)
          .get('/token')
          .set('cookie', cookie)
          .expect(200, done)
      })
    })
Read more comments on GitHub >

github_iconTop Results From Across the Web

Feature Chaining — GeoServer 2.21.x User Manual
This page describes the use of “Feature Chaining” to compose complex features from simpler components, and in particular to address some requirements that ......
Read more >
Feature Chaining Mapping | API4INSPIRE
Feature Chaining allows one to configure the mapping for each individual featureType or dataType separately within a FeatureTypeMapping section of the ...
Read more >
Optional chaining (?.) - JavaScript - MDN Web Docs - Mozilla
The optional chaining (?.) operator accesses an object's property or calls a function. If the object accessed or function called is ...
Read more >
[Feature] Chaining function and methods #19545 - GitHub
Hi there PW team! I would like to suggest adding an option to chain the functions/methods like in the Syntax of the TestCafe...
Read more >
Activation Dependencies and Feature Stapling - Catapult
Feature stapling allows you to associate a feature with a site definition so that when a site based on a ... Complex feature...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found