0

I'm using Mocha and supertest to do some simple testing in my NodeJS server. I now want to test this scenario:

  1. Using my application in superset I make a request
  2. The response contains a URL in it
  3. I need to now test this URL is correct (via HTTP)

The URL will be the same server as running in superset. So if I first call .get('/some-data') the resulting URL will be fully qualified like http://localhost:3456/a-path.

I'm not clear how I could set this up, or if it is even possible using these tools.

edA-qa mort-ora-y
  • 30,295
  • 39
  • 137
  • 267

1 Answers1

0

Yout could just require something like request or the like and them make a http-request and check if the status code is 200 etc.

Joseph Adams
  • 972
  • 1
  • 6
  • 19