Skip to content

test: raise coverage to 84% - #2

Open
juicycleff wants to merge 1 commit into
mainfrom
test/raise-coverage
Open

juicycleff wants to merge 1 commit into
mainfrom
test/raise-coverage

Conversation

@juicycleff

Copy link
Copy Markdown
Contributor

This takes vessel's test coverage from 76.3% to 84.2%, which clears the 80% bar awesome-go asks for. There are no source changes.

You can check the number yourself:

go test -race -coverprofile=c.out ./... && go tool cover -func=c.out | tail -1

Everything new is in provide_gaps_test.go. It covers code that had no tests at all: ProvideValue, ProvideNamed, the deprecated ProvideConstructor and InjectType wrappers, the lifecycle options, InjectGroup and resolveGroup (empty groups, a missing registry, the wrong element type), HasType, deriveServiceName, ErrTypeMismatch, the dependency graph lookups, and the Name() accessors on Lazy, OptionalLazy and Provider.

Codecov isn't switched on for this repo yet, so CI won't post a coverage figure until it is.

Coverage goes from 76% to 84% for the root package. Adds tests for ProvideValue,
ProvideNamed, the deprecated Provide/Inject wrappers, lifecycle options,
InjectGroup and resolveGroup (empty, missing registry, wrong element type),
HasType, deriveServiceName, ErrTypeMismatch, DependencyGraph lookups and the
Name accessors on Lazy, OptionalLazy and Provider.
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.

1 participant