mirror of
https://github.com/laosb/SwiftTailwind.git
synced 2025-11-28 22:01:38 +00:00
First working version.
This commit is contained in:
parent
2f70b79493
commit
8fbeb20900
6 changed files with 227 additions and 2 deletions
25
Tests/SwiftTailwindTests/Tests.swift
Normal file
25
Tests/SwiftTailwindTests/Tests.swift
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
import Testing
|
||||
|
||||
@testable import SwiftTailwindExample
|
||||
|
||||
@Suite("SwiftTailwindExample")
|
||||
struct SwiftTailwindExampleTests {
|
||||
@Test
|
||||
func example() throws {
|
||||
let example = Example()
|
||||
let generatedCSS = try example.getGeneratedCSS()
|
||||
#expect(generatedCSS != nil)
|
||||
#expect(
|
||||
generatedCSS?.contains("text-2xl") == true,
|
||||
"Class used in Swift code is generated."
|
||||
)
|
||||
#expect(
|
||||
generatedCSS?.contains("text-\\[\\#f05138\\]") == true,
|
||||
"Arbitary value class used in Test.html is generated."
|
||||
)
|
||||
#expect(
|
||||
generatedCSS?.contains("bg-blue-500") == false,
|
||||
"Class not used is not generated."
|
||||
)
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue