You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Test should pass and store the snapshot on its first run.
Actual behaviour
I'm getting the following error (which is expected and well described).
Kotlin Snapshot library couldn't find the name of the test. Review if the test case file or the spec file contains the word test or spec or specify a snapshot name manually, this is a requirement needed to use Kotlin Snapshot.
This is due to my test suite being called ConversationsEndToEndShould. So the explicit error message was helpful and accurate. I've fixed it by naming the snapshot, like: viewModel.viewState.value.matchWithSnapshot("Conversations loaded")
I've not digged yet on how you've implemented the test indexing but It'd be nice if it wasn't depending on the test or test class names that much (in case it's possible), or alternatively add a rule for the "should" substring.
"Should" is kind of used in tests broadly since it gives a good naming when you run them, like:
That's used more often in java probably, since Kotlin already supports using human readable names with spaces and so on in tests, but still it'd be a nice to have.
@JorgeCastilloPrz For the current version 0.3.0 you must add the word Test or Spec in your tests, but for the next one you will use any other names for test classes after merge #34 馃憤
First of all, thank you very much for this super cool lib, really good work as always :). Karumi stays strong 馃挭 :P.
I got the following test:
Expected behaviour
Test should pass and store the snapshot on its first run.
Actual behaviour
I'm getting the following error (which is expected and well described).
This is due to my test suite being called
ConversationsEndToEndShould
. So the explicit error message was helpful and accurate. I've fixed it by naming the snapshot, like:viewModel.viewState.value.matchWithSnapshot("Conversations loaded")
I've not digged yet on how you've implemented the test indexing but It'd be nice if it wasn't depending on the test or test class names that much (in case it's possible), or alternatively add a rule for the "should" substring.
"Should" is kind of used in tests broadly since it gives a good naming when you run them, like:
That's used more often in java probably, since Kotlin already supports using human readable names with spaces and so on in tests, but still it'd be a nice to have.
Version of the library
0.3.0
The text was updated successfully, but these errors were encountered: