Skip to content

Seems to hide insecure certificate exceptions/helpful errors? #3

@literallyMello

Description

@literallyMello

When testing internal APIs with insecure/untrusted certificates I was getting error

  ✖ NightwatchAssertError
   Cannot read properties of undefined (reading 'status')

when running a test similar to

await supertest
      .request("https://internal-insecurely-signed-app.url.int")
      .get("/_manage/health")
      .expect(200);

until I thought to try using the .disableTLSCerts() option (the API under test int his scenario does not use a securely-signed certificate)

await supertest
      .request("https://internal-insecurely-signed-app.url.int")
      .get("/_manage/health")
      .disableTLSCerts()
      .expect(200);

Unless I'm mistaken I recall SuperTest providing an error in these scenarios that would more easily let the user realize it didn't connect because of an insecure certificate. Is the plugin hiding the exception?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions