{"id":15038756,"url":"https://github.com/vknabel/taps","last_synced_at":"2025-10-04T03:32:02.455Z","repository":{"id":56923813,"uuid":"79359984","full_name":"vknabel/Taps","owner":"vknabel","description":"Taps is a lightweight Unit Test library optimized for asynchronous code and generating TAP13 compatible output.","archived":true,"fork":false,"pushed_at":"2017-03-01T18:40:18.000Z","size":791,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-09-16T15:30:28.151Z","etag":null,"topics":["asynchronous","cocoapods","reactivex","rxswift","swift","swift-3","swift-package-manager","swiftpm","tape","unit-testing"],"latest_commit_sha":null,"homepage":null,"language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vknabel.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-01-18T16:32:30.000Z","updated_at":"2023-01-28T19:34:45.000Z","dependencies_parsed_at":"2022-11-29T13:20:32.350Z","dependency_job_id":null,"html_url":"https://github.com/vknabel/Taps","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/vknabel/Taps","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vknabel%2FTaps","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vknabel%2FTaps/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vknabel%2FTaps/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vknabel%2FTaps/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vknabel","download_url":"https://codeload.github.com/vknabel/Taps/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vknabel%2FTaps/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278259829,"owners_count":25957547,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-04T02:00:05.491Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["asynchronous","cocoapods","reactivex","rxswift","swift","swift-3","swift-package-manager","swiftpm","tape","unit-testing"],"created_at":"2024-09-24T20:40:03.492Z","updated_at":"2025-10-04T03:32:02.153Z","avatar_url":"https://github.com/vknabel.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Taps\n\n![Swift 3](https://img.shields.io/badge/swift-3.0-orange.svg?style=flat-square)\n[![GitHub release](https://img.shields.io/github/release/vknabel/taps.svg?style=flat-square)](https://github.com/vknabel/taps/releases)\n[![SwiftPM compatible](https://img.shields.io/badge/SwiftPM-compatible-brightgreen.svg?style=flat-square)](https://github.com/apple/swift-package-manager)\n![Plaforms](https://img.shields.io/badge/Platform-Linux|macOS|iOS|tvOS|watchOS-lightgrey.svg?style=flat-square)\n![Build Status](https://img.shields.io/circleci/project/github/vknabel/Taps.svg?style=flat-square)\n[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square)](https://raw.githubusercontent.com/vknabel/rock/master/LICENSE)\n\nTaps is a lightweight Unit Test library optimized for asynchronous code.\nIt has been implemented using RxSwift and therefore you can easily test your own Observables with ease,\nbut no RxSwift knowledge is needed.\n\nAs the generated output is [TAP13](https://testanything.org/tap-version-13-specification.html) compatible, you can easily customize it yourself.\nYou can either use Taps integrated TapsHarness or you can use the pod TestHarness to customize the output.\n\nYou'll find the autogenerated docs [here](https://vknabel.github.io/Taps/generated).\n\n## Example\n\nTaps assumes all tests to be concurrent. That said it is quite easy to run them:\n\n```swift\ntaps.test(\"test async completion\", timeout: 0.1) { t in\n  DispatchQueue.global().async {\n    t.pass()\n    t.end() // this terminates the test\n  }\n}\n```\n\nBut instead of always being forced to call the `t.end()` when testing synchronous code,\nyou can add a plan for all expected tests.\n\n```swift\ntaps.test(\"test does not throw on return\", plan: 1) { t in\n  t.doesThrow(\"does throw is ok when throwing\") {\n    return 1\n  }\n}\n```\n\nSince Taps uses RxSwift under the hood it really shines, when it comes to testing `Observable`s.\nIf your tested `Observable` completes, the test will automatically be finished!\n\n```swift\ntape.test(\"just emits\", timeout: 0.01) { t in\n  Observable.just(3)\n    .map { $0 + 1 }\n    .test(\n      onNext: t.notEqual(to: 3, \"just emits 3\"),\n      onError: t.fail(with: \"just won't throw'\")\n    )\n}\n```\n\n## License\n\nFinite is available under the MIT license. See the LICENSE file for more info.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvknabel%2Ftaps","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvknabel%2Ftaps","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvknabel%2Ftaps/lists"}