Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can entire Superagent API be used? #431

Closed
gsccheng opened this issue Aug 30, 2017 · 2 comments
Closed

Can entire Superagent API be used? #431

gsccheng opened this issue Aug 30, 2017 · 2 comments

Comments

@gsccheng
Copy link

I tried a simple:

const request = require('supertest');

describe('/actions', () => {
  describe('GET /', () => {
    it('works', () => {
      request
        .get('/actions')
        .expect(200)
        .end(function(err, res) {
          if (err) throw err;
        });
    });
  });
})

and I get an error:

- TypeError: request.get is not a function

I want to use supertest without having the app object.

I'm using Supertest@3.0.0

@gsccheng
Copy link
Author

Nevermind, you initialize request with the url.

@markstos
Copy link

markstos commented Jan 1, 2018

The intent is that Superagent will largely work. Currently there is bug with the ".agent" behavior of superagent not working that is resolved by PR #453

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants