Open
Description
When json-snapshot
is added to a project, it pulls a number of dependencies (see output of mvn dependency:tree
:
[INFO] \- io.github.json-snapshot:json-snapshot:jar:1.0.16:test
[INFO] +- org.apache.commons:commons-lang3:jar:3.7:test
[INFO] +- org.mockito:mockito-junit-jupiter:jar:2.23.0:test
[INFO] +- org.junit.platform:junit-platform-runner:jar:1.2.0:test
[INFO] | +- org.junit.platform:junit-platform-launcher:jar:1.2.0:test
[INFO] | \- org.junit.platform:junit-platform-suite-api:jar:1.2.0:test
[INFO] \- org.junit.vintage:junit-vintage-engine:jar:5.1.0:test
Most of them should not be needed on the test classpath of the project using this lib.
E.g. I want to use JUnit 5 in my project and NOT have JUnit 4 on classpath (to avoid accidentally mixing up annotations from different versions). This is currently not possible, as if I exclude JUnit 4 from json-snapshot dependency, then io.github.jsonSnapshot.SnapshotMatcher#hasTestAnnotation
fails.
The check which classes are available on classpath should be string-based (i.e. if the annotation class is not available, json-snapshot should simply not look for that on test methods).
Metadata
Metadata
Assignees
Labels
No labels