nightwatchjs / nightwatch-plugin-apitesting

Run API tests in Nightwatch using supertest
https://nightwatchjs.org
MIT License
2 stars 8 forks source link

Add type /types/index.d.ts with supertest type #5

Closed reallymello closed 1 year ago

reallymello commented 1 year ago

This change should allow typescript projects using this plugin in Nightwatch to add "types": ["@nightwatch/apitesting"], to their tsconfig.json to add the .supertest type to the Nightwatch API when writing their tests

{
  "compilerOptions": {
    "types": ["@nightwatch/apitesting"],
  }
}

Traditionally, the type file is at the same level of index.js, but in some examples I've seen for Nightwatch plugins the types were under /nightwatch/types/<typefilehere> so that is why I went with that placement.