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

Add edge tests around Provide and Invoke #76

Merged
merged 2 commits into from May 31, 2017

Conversation

anuptalwalkar
Copy link
Contributor

@anuptalwalkar anuptalwalkar commented May 31, 2017

Added some missing edge cases around provide -

  1. Multiple return provide returning same object more than once
  2. Failure cases for combination of Provide ctor and instance of same type
  3. Invocation inside invocation.

@coveralls
Copy link

Coverage Status

Coverage increased (+2.4%) to 91.617% when pulling eaaea66 on anup-dig-behavior-tests into 863426c on ajs-fix-behavior-tests.

1 similar comment
@coveralls
Copy link

Coverage Status

Coverage increased (+2.4%) to 91.617% when pulling eaaea66 on anup-dig-behavior-tests into 863426c on ajs-fix-behavior-tests.

Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1

@abhinav
Copy link
Collaborator

abhinav commented May 31, 2017

@anuptalwalkar can you add something to the PR description for more context?

constructor := func() (*A, *A, error) {
return &A{}, &A{}, nil
}
require.Error(t, c.Provide(constructor), "provide failed")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this particular test function has only success cases (EndToEndSuccess). Perhaps move this out to a different test.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good point. I will move it out.

@coveralls
Copy link

coveralls commented May 31, 2017

Coverage Status

Coverage increased (+1.2%) to 91.617% when pulling cc8c6a3 on anup-dig-behavior-tests into 983c523 on ajs-fix-behavior-tests.

@anuptalwalkar anuptalwalkar merged commit c2597a2 into ajs-fix-behavior-tests May 31, 2017
@anuptalwalkar anuptalwalkar deleted the anup-dig-behavior-tests branch May 31, 2017 22:58
abhinav pushed a commit that referenced this pull request Jun 1, 2017
* rebase for conflicts

* moved failure tests into its own test
hbdf pushed a commit to hbdf/dig that referenced this pull request Jul 14, 2022
hbdf pushed a commit to hbdf/dig that referenced this pull request Jul 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants