<@U12AGS8JG> am i right to understand that we can’...
# kotest-contributors
m
@sam am i right to understand that we can’t do nested tests in js?
s
correct
m
right context: i’m trying to make sense of the failures in @Imran/Malic is seeing in kotest-extensions-arrow. and true enough i stumble upon the
Copy code
JavascriptSpecExecutorDelegate
and your note pointing to
Copy code
<https://youtrack.jetbrains.com/issue/KT-22228>
in that case is there any way we can fix that function in that repo? the one that registers tests in container? i was thinking of the same mechanism we do withData… but it seems like that if js doesn’t support nested tests then we can’t do that
s
I think its because it's registering at the wrong level
m
hmm
what it was doing before was trying to call addTest in root scope and that threw
Copy code
io.kotest.core.spec.InvalidDslException: Cannot add a root test after the spec has been instantiated
ah
hang on, was it putting that inside of a test? let me check the code in master again
it was
Copy code
class MonoidLawTests : StringSpec({
  "Boolean, Int, String obeys MonoidLaws" {
    testLaws(
      MonoidLaws.laws(Monoid.boolean(), Arb.boolean()),
      MonoidLaws.laws(<http://Monoid.int|Monoid.int>(), <http://Arb.int|Arb.int>()),
      MonoidLaws.laws(Monoid.string(), Arb.string())
    )
  }
})
ok i think i know what to do
thanks @sam 🙌 . @Imran/Malic i’m going to try pushing something in. as my local machine seems to not work for that repo i have to rely on you and github for my dev loop
that works!
thanks again @sam 👌