-
Notifications
You must be signed in to change notification settings - Fork 14
Conversation
hmm.. the laws dsl in this repo doesn't work anymore due to the way that's being declared with string spec. |
…iation is no longer legal
laws | ||
.flatMap { list: List<Law> -> list.asIterable() } | ||
.distinctBy { law: Law -> law.name } | ||
.forEach { law: Law -> | ||
addTest(TestName(prefix, law.name, true), disabled = false, config = null) { law.test(this) } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@i-walker this addTest
is no longer allowed after spec is instantiated kotest/kotest#2872
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It never was, it just silently ignored the test. So in 5.2 it actually lets you know it's broken.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@i-walker I believe under normal circumstances we normally do that within container scope. I tried fixing that here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome thank you I didn‘t know the context :)
1b77cf6
to
c06b0cc
Compare
My laptop cannot run gradle check locally on this repo somehow, i'm using github CI as my dev loop. 3 tests completed, 1 failed
MonoidLawTests.Boolean, Int, String obeys MonoidLaws FAILED
IllegalStateException at /tmp/_karma_webpack_557292/commons.js:102685
There were failing tests
> Task :kotest-property-arrow:jsNodeTest So i think by fixing the laws the tests started to run and seems like that started failing. I'll hand this over to you @i-walker i don't think i can easily debug this with my broken setup |
Thanks @myuwono I‘ll take a look this evening 👍🏾 |
MonoidLaws.laws(Monoid.string(), Arb.string()) | ||
) | ||
} | ||
class MonoidLawTests : FunSpec({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: can't we use StringSpec here?
aGen = Arb.list(Arb.int()), | ||
bGen = Arb.int(), | ||
funcGen = Arb.functionAToB(Arb.int()), | ||
class TraversalTests : FunSpec({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left a few nits, thanks @myuwono 👍🏾
No description provided.