microsoft / typed-rest-client

Node Rest and Http Clients with typings for use with TypeScript
Other
675 stars 118 forks source link

Updated tests to use Nock instead of httpBin #77

Closed damccorm closed 6 years ago

damccorm commented 6 years ago

Switched tests to use nock to spoof Http requests instead of connecting to httpBin. Eliminates timeout failures for tests and allows offline testing. Added tests to ensure that response bodies are included when error is thrown.

Fixes #72 and closes Microsoft/vsts-node-api#34

stephenmichaelf commented 6 years ago

Looks good. Can we add tests for NTLM and any other missing auth handlers? Also same question here as in the other repo for @bryanmacfarlane about L0 and L2 tests.

stephenmichaelf commented 6 years ago

Small thing about Typescript: if you create a variable and it isn't going to change you can use "const" instead of let.