Skip to content

crisfeim/sandbox-swift-minitesting

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

3 Commits
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

swift-mini-testing

Messy exploration of a minimal testing system for Swift scripts (I used to rely heavyly on scripting for lightweight projects with no Xcode, so no xctest)

Supports:

  • Test case definition via @Test property wrapper
  • Async test support
  • Lightweight test discovery using reflection
  • Thread-local test context tracking
  • Simple expectations and assertions with labeled output
  • Manual test suite orchestration

Usage

struct MyTest: TestCase {
  @Test var exampleTest = {
    let result = try await sut.get()
    expect(result).toBe("expected result")
  }
}

MyTest().setup()
TestsSuite.run()

About

๐Ÿ–๏ธ Sandbox of a minimal testing lib for Swift scripts

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages