Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: fix re-use existing authClient test #23

Merged
merged 4 commits into from
Jul 26, 2017

Conversation

ofrobots
Copy link
Collaborator

I believe this got broken by #21.

@stephenplusplus
Copy link
Owner

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).

@ofrobots
Copy link
Collaborator Author

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.

@stephenplusplus
Copy link
Owner

Is this line tested anywhere?

this.authClientPromise = Promise.resolve(this.authClient);

@ofrobots
Copy link
Collaborator Author

Not only was that line untested, it was unreachable. PTAL.

@ofrobots
Copy link
Collaborator Author

Actually it still might benefit from an additional test. Adding.

@stephenplusplus stephenplusplus merged commit 3402be3 into stephenplusplus:master Jul 26, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants