Closed ofrobots closed 7 years ago
Can you explain more how this was broken? It also doesn't seem like the test that's been changed is still testing what it says it is (re-using a cached auth client).
With #21, if an authClient
exists, we simply return it. The test was mocking authClient
but and expecting authClientPromise
would resolve to the mocked value of authClient
.
Is this line tested anywhere? https://github.com/stephenplusplus/google-auto-auth/blob/ac4daa66d68d0280cc6b7345fee2583ad838de37/index.js#L111
Not only was that line untested, it was unreachable. PTAL.
Actually it still might benefit from an additional test. Adding.
I believe this got broken by https://github.com/stephenplusplus/google-auto-auth/pull/21.