How to use the __getAuthedRequests function from request

Find comprehensive JavaScript request.__getAuthedRequests code examples handpicked from public code repositorys.

811
812
813
814
815
816
817
818
819
820
821
822
});


// sync test because we need to get all the requests to confirm their validity
test('install a scoped module from authed private registry', (): Promise<void> => {
  return runInstall({}, 'install-from-authed-private-registry', async config => {
    const authedRequests = request.__getAuthedRequests();


    expect(authedRequests[0].url).toEqual('https://registry.yarnpkg.com/@types%2flodash');
    expect(authedRequests[0].headers.authorization).toEqual('Bearer abc123');
    expect(authedRequests[1].url).toEqual('https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.37.tgz');
fork icon3
star icon5
watch icon0

+ 3 other calls in file