-
Notifications
You must be signed in to change notification settings - Fork 209
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PR #404 attempted to improve the tests in `visualize_test.go` by requiring length equality on the expected/actual ctors. During CI, this actually uncovered a test failure: ``` --- FAIL: TestDotGraph (0.02s) --- FAIL: TestDotGraph/create_graph_with_one_constructor_and_as_interface_option (0.00s) visualize_test.go:453: Error Trace: visualize_test.go:453 visualize_test.go:117 Error: "[]" should have 1 item(s), but has 0 Test: TestDotGraph/create_graph_with_one_constructor_and_as_interface_option ``` This is because, in this specific test case, the provide was never actually provided because of an error during provide (`t5 did not implement io.Reader`). This commit: * Changes all of the provides that are expected to pass to `RequireProvide` which will fail if the provide fails. * Modifies `t5` to implement `io.Reader`. * Change the test case to expect the provider to only provide the interface in the `fx.As` (`fx.As` does not also provide the actual type) * Add the len check from #404.
- Loading branch information
Showing
1 changed file
with
46 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters