Combine common and tests #143
inancgumus
started this conversation in
Ideas
Replies: 2 comments
-
I would expect this is because the tests are in another package and by default coverage is only tracked for the package under test which is what You can see how it's used in k6 here so that it also tracks coverage for all (k6) packages that are dependencies of the package under test. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Thanks, right, but I don't see a good reason for these super-related packages and their tests are in different packages. go test ./tests ./common \
-coverpkg=github.com/grafana/xk6-browser/common,github.com/grafana/xk6-browser/tests \
-coverprofile=cover.out |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I propose combining the code and tests and restructuring the extension code.
One of the reasons:
The current package structure makes it hard to get coverage for the project.
Although we test the types in the
common/
package to some extent, the coverage tool cannot cover them. This is because the tests are intests/
while their tests are incommon/
. To do that, we need to use-coverpkg
all the time.This problem makes our jobs more complicated to create new tests and see what we are improving.
Beta Was this translation helpful? Give feedback.
All reactions