Skip to content

Commit

Permalink
Add state tests and move Text tests into a sub-directory. (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
jverkoey authored Aug 1, 2024
1 parent b3ef1b9 commit 33e9b96
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions Tests/SlipstreamTests/StateTests.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import Testing

import Slipstream

private struct StateView: View {
let string: String
var body: some View {
Text(string)
}
}

struct StateTests {
@Test func rendersProvidedString() throws {
try #expect(renderHTML(StateView(string: "Hello, world!")) == "Hello, world!")
try #expect(renderHTML(StateView(string: "Slipstream")) == "Slipstream")
}
}
File renamed without changes.

0 comments on commit 33e9b96

Please sign in to comment.