question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add `And` scope to `BehaviorSpec` Then

See original GitHub issue

Any scope inside a Spec must either be a TestType.Test or TestType.Container. A scope cannot be both.

There is a possibility to use TestType.CONTAINER_AND_TEST, however, Gradle is bugged, and doesn’t work with it.

For this reason, we cannot have Then -> And -> Then in behavior Spec, because Then might be a test and a Container.

As we can’t choose both right now, it’s unsupported.

I’m keeping this open, because when (if?) gradle fixes the linked issue, we’ll be able to add this feature.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

3reactions
dragneelfpscommented, May 27, 2021

Would it be possible to reopen this? I know behavior spec is complicated, but from user perspective this feature would be very helpful.

1reaction
jumpstreet13commented, Aug 8, 2022

I tried And in Then scope on my project and all worked like a charm. There were updates ? Screenshot 2022-08-08 at 17 39 03

Read more comments on GitHub >

github_iconTop Results From Across the Web

Testing Styles - Kotest
Popular with people who like to write tests in the BDD style, BehaviorSpec allows you to use given , when , then ....
Read more >
Kotest Pro Tips - ProAndroidDev
Add the kotest-assertions-arrow module to your build and then you'll need a ... It's contrived but shows how each individual test scope runs ......
Read more >
Introduction to Kotest | Baeldung on Kotlin
Kotest provides many different testing styles. Let's look at examples of some popular styles. 3.1. Behavior Spec.
Read more >
memoizr / kotlintest Download - JitPack
Add it in your root build.gradle at the end of repositories: ... BehaviorSpec allows you to use given , when , then ,...
Read more >
kotest nested spec in describe clause - kotlin - Stack Overflow
But if its not possible then probably will include it out of scope. – MrNetroful. May 28, 2020 at 7:22. Add a comment ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found