{"id":13340149,"url":"https://github.com/artem-y/swifty-test-assertions","last_synced_at":"2026-01-16T16:57:49.479Z","repository":{"id":207608036,"uuid":"719334173","full_name":"artem-y/swifty-test-assertions","owner":"artem-y","description":"Lightweight addition of useful assertions to XCTest","archived":false,"fork":false,"pushed_at":"2024-01-06T10:07:01.000Z","size":9,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-11T16:40:47.906Z","etag":null,"topics":["ios","macos","swift","testing-tools","tvos","unit-testing","visionos","watchos","xctest"],"latest_commit_sha":null,"homepage":"","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/artem-y.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2023-11-16T00:18:30.000Z","updated_at":"2023-11-16T15:48:43.000Z","dependencies_parsed_at":"2024-01-13T07:22:53.358Z","dependency_job_id":"53bb849a-edc0-4971-a661-3c03269fead8","html_url":"https://github.com/artem-y/swifty-test-assertions","commit_stats":{"total_commits":6,"total_committers":1,"mean_commits":6.0,"dds":0.0,"last_synced_commit":"2eaaab685e3ade033f39b2496c26ead8aa6376eb"},"previous_names":["artem-y/swifty-test-assertions"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/artem-y/swifty-test-assertions","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/artem-y%2Fswifty-test-assertions","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/artem-y%2Fswifty-test-assertions/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/artem-y%2Fswifty-test-assertions/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/artem-y%2Fswifty-test-assertions/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/artem-y","download_url":"https://codeload.github.com/artem-y/swifty-test-assertions/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/artem-y%2Fswifty-test-assertions/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28480081,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T11:59:17.896Z","status":"ssl_error","status_checked_at":"2026-01-16T11:55:55.838Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["ios","macos","swift","testing-tools","tvos","unit-testing","visionos","watchos","xctest"],"created_at":"2024-07-29T19:22:08.171Z","updated_at":"2026-01-16T16:57:49.446Z","avatar_url":"https://github.com/artem-y.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SwiftyTestAssertions\nLightweight addition of useful assertions to XCTest  \n\nI've been using these assertions in different projects for a while and they proved quite handy, so I decided to move them to separate package. It is important that this package only contains the actual assertions without extra noise, to make it small and easy to add.\n\n### Installation\n#### In Swift package:\n1. Add `swifty-test-assertions` to package dependencies in `Package.swift`:\n   \n   ```swift\n   .package(url: \"git@github.com:artem-y/swifty-test-assertions.git\", from: \"0.1.1\"),\n   ```\n2. Add `SwiftyTestAssertions` product dependency to test target(s) in `Package.swift`:\n   ```swift\n   .product(name: \"SwiftyTestAssertions\", package: \"swifty-test-assertions\"),\n   ```\n3. Import `SwiftyTestAssertions` module where they need to be used:\n   ```swift\n   import SwiftyTestAssertions\n   ```\n#### In Xcode project/workspace:\n1. Go to File \u003e Add Package Dependencies... in Xcode top navigation menu.  \n   - _or go to project settings \"Package Dependencies\" and hit \"+\"_  \n   - _or go to \"General\" target settings tab, in target's \"Frameworks and Settings\" section choose \"+\", then select \"Add Package Dependency...\"_\n3. Search for `artem-y/swifty-test-assertions` (paste this link into search):\n\n    ```swift\n    git@github.com:artem-y/swifty-test-assertions.git\n    ```\n4. When Xcode finds the package, select \"Up to Next Major Version\" dependency rule and press \"Add Package\" button\n5. Choose a test target that needs to use this package and press \"Add Package\"\n6. Import `SwiftyTestAssertions` module where they need to be used:\n   ```swift\n   import SwiftyTestAssertions\n   ```\n### Examples\n```swift\n    Assert(\n        try sut.validate(colorHex: \"ABCXYZ\"), // tested expression\n        throwsError: ArgumentValidator.ColorHexError.hasInvalidSymbols // check if this exact error is thrown\n    )\n```\nMore code examples using these helpers can be found in [examples-of-swifty-test-assertions](https://github.com/artem-y/examples-of-swifty-test-assertions) repository. They are kept there separately to make this library as lightweight as possible.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fartem-y%2Fswifty-test-assertions","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fartem-y%2Fswifty-test-assertions","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fartem-y%2Fswifty-test-assertions/lists"}