diffplug / diffplug/selfie

Remove requirement to not have "/" in test names? (Junit 5)

Open
#514 1 comment 0 reactions 0 assignees View on GitHub
enhancement jvm
Dominant language
Kotlin
Stars
101
Forks
18
PR merge metrics
No merged PRs in 30d

Description

Fantastic tool, thank you! I only hit a little snag: in my project I already have many Kotest/Junit5 units named after HTTP endpoints such as `GET /example`, and I'm hitting this error:

```
Caused by: java.lang.IllegalStateException: Test name cannot contain '/', was ...
at com.diffplug.selfie.junit5.SnapshotFileProgress.startTest(SnapshotSystemJUnit5.kt:188)
```

This happens for every test even though they do not invoke Selfie for snapshots. Could this requirement be loosened somehow? For example:

* Escape the resulting name of snapshot files to remove the slash
* Do not run this check in tests that do not make use of Selfie

Thank you.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.