Supertest: How to set query params

Created on 10 Nov 2018  路  2Comments  路  Source: visionmedia/supertest

please how do I send query params so my test doesn't fail

question

Most helpful comment

I would recommend you to read the superagent docs. Most of it's public API is available to supertest. You could probably do something like:

   request('http:///the-url.com/some-path').query({ key: 'value' })

All 2 comments

I would recommend you to read the superagent docs. Most of it's public API is available to supertest. You could probably do something like:

   request('http:///the-url.com/some-path').query({ key: 'value' })

Just in case anyone else is wondering, you now nee to query this as:

```
request('http:///the-url.com/some-path')
.get("/")
.query({ key: 'value' })
````

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jon301 picture jon301  路  5Comments

peterjuras picture peterjuras  路  3Comments

ghost picture ghost  路  5Comments

EverettQuebral picture EverettQuebral  路  3Comments

schm1ty1 picture schm1ty1  路  4Comments