Skip to content

Commit

Permalink
more tests (#93)
Browse files Browse the repository at this point in the history
  • Loading branch information
nguyenyou authored Jun 3, 2024
1 parent 4693997 commit c491c87
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions integration/src/scalawind.test.scala
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ class SimpleSingleTests extends munit.FunSuite {
test("raw values") {
assert(sw(tw.raw("text-green-400")) == "text-green-400")
}
test("important modifier") {
assert(sw(tw.important(tw.text_red_400)) == "!text-red-400")
}
}

class ComplexChainingTests extends munit.FunSuite {
Expand All @@ -36,4 +39,10 @@ class ComplexChainingTests extends munit.FunSuite {
test("arbitrary values") {
assert(sw(tw.flex.text_("#ff0").items_center.bg_("#00f")) == "flex text-[#ff0] items-center bg-[#00f]")
}
test("important modifer") {
assert(sw(tw.sm(tw.hover(tw.important(tw.font_bold)))) == "sm:hover:!font-bold")
}
test("arbitrary variant") {
assert(sw(tw.lg(tw.variant("&:nth-child(3)", tw.hover(tw.underline)))) == "lg:[&:nth-child(3)]:hover:underline")
}
}

0 comments on commit c491c87

Please sign in to comment.