googleapis / google-auth-library-nodejs

🔑 Google Auth Library for Node.js
Apache License 2.0
1.73k stars 381 forks source link

build: Fixing tests that use reqheaders improperly #1589

Closed aeitzman closed 1 year ago

aeitzman commented 1 year ago

Fixing tests that are using reqheaders for nock improperly. Quite a few of our tests, especially for externalaccount clients, use reqheaders on the nock interceptors instead of the scope. Nock does not actually check for the request headers if passed to an interceptor, so this changes all of those uses. Also adds nock.cleanAll() for the test files that do not have it already in aftereach().