Erik
04/24/2023, 7:58 AMclass TestyMcTestFace : StringSpec({
"root" {
"node" {
1 + 1 shouldBe 2
}
}
})
It results in an InvalidDslException: Cannot add a root test after the spec has been instantiated: node
Emil Kantis
04/24/2023, 8:04 AMFreeSpec
is almost identical but also supports nestingEmil Kantis
04/24/2023, 8:04 AMclass TestyMcTestFace : FreeSpec({
"root" - {
"node" {
1 + 1 shouldBe 2
}
}
})
Note the hyphen for nesting.Erik
04/24/2023, 8:05 AMErik
04/24/2023, 8:06 AMErik
04/24/2023, 8:06 AMAll styles offer the ability to nest tests.
Emil Kantis
04/24/2023, 8:09 AMErik
04/24/2023, 8:14 AMLeoColman
04/24/2023, 4:25 PMLeoColman
04/24/2023, 4:26 PMFreeSpec
and transform it to StringSpec
+ Containers. However, Gradle doesn't like having a test that is both a Container
and a Test
, and thus we are cornered.LeoColman
04/24/2023, 4:29 PMLeoColman
04/24/2023, 4:29 PMLeoColman
04/24/2023, 4:30 PMErik
04/25/2023, 12:08 PM