{"id":2131,"url":"https://github.com/shindyu/XCTestExtensions","last_synced_at":"2025-08-02T23:31:58.539Z","repository":{"id":27737785,"uuid":"115071168","full_name":"shindyu/XCTestExtensions","owner":"shindyu","description":"XCTestExtensions is a Swift extension that provides convenient assertions for writing Unit Test. ","archived":false,"fork":false,"pushed_at":"2022-02-14T02:14:10.000Z","size":188,"stargazers_count":22,"open_issues_count":1,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-08-16T03:32:44.760Z","etag":null,"topics":["convenient-assertions","swift-extensions","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/shindyu.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}},"created_at":"2017-12-22T03:11:44.000Z","updated_at":"2022-12-01T10:00:55.000Z","dependencies_parsed_at":"2022-08-07T13:01:05.276Z","dependency_job_id":null,"html_url":"https://github.com/shindyu/XCTestExtensions","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shindyu%2FXCTestExtensions","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shindyu%2FXCTestExtensions/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shindyu%2FXCTestExtensions/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shindyu%2FXCTestExtensions/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shindyu","download_url":"https://codeload.github.com/shindyu/XCTestExtensions/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228503131,"owners_count":17930517,"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","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":["convenient-assertions","swift-extensions","xctest"],"created_at":"2024-01-05T20:16:05.457Z","updated_at":"2024-12-06T17:30:45.540Z","avatar_url":"https://github.com/shindyu.png","language":"Swift","funding_links":[],"categories":["Testing"],"sub_categories":["Other Testing","Other free courses"],"readme":"# XCTestExtensions\n[![Build Status](https://app.bitrise.io/app/d0839dd24a68d8bb/status.svg?token=Ev-O5IKO3HWhOPjZg9-Knw\u0026branch=master)](https://app.bitrise.io/app/d0839dd24a68d8bb)\n\n# Features\n- [x] `XCTAssertEventually` (that convenient assertions  for writing Unit Test).\n\n  - Use \"XCTAssertEventually\", you can write asynchronous assertions very easily and intuitively, like [Nimble](https://github.com/Quick/Nimble)'s toEventually.\n\n- [x] `XCTxContext` (It is a wrapper of XCTContext.runActivity.)\n  - `XCTxContext` can internally test setup and tearDown of TestClass. Of course you can not do it.\n\n# Installation\n## Installing with Carthage\n\nAdd to `Cartfile.private`\n```\ngithub \"shindyu/XCTestExtensions\"\n```\n\n# Usage\nImport `XCTestExtensions` to Unit tests files:\n```swift\nimport XCTestExtensions\n```\n\n\nUse `XCTestExtensions`'s extensions in your tests:\n\u003cimg src=\"https://raw.githubusercontent.com/shindyu/XCTestExtensions/master/img/method_completion.png\"\u003e\n\n\nFor example, Applying it to [the asynchronous test of the official document of apple](https://developer.apple.com/documentation/xctest/asynchronous_tests_and_expectations/testing_asynchronous_operations_with_expectations), it can be described as follows:\n```swift\n    func testDownloadWebData_UsingXCTAssertEventually() {\n        XCTxContext(\"you can describe context\") {\n            let url = URL(string: \"https://apple.com\")!\n\n            var downloadData: Data?\n\n            let dataTask = URLSession.shared.dataTask(with: url) { (data, _, _) in\n                downloadData = data\n            }\n\n            dataTask.resume()\n\n            XCTAssertNotNilEventually(downloadData)\n        }\n    }\n```\n\n# Contributing\nBug reports and pull requests are welcome on GitHub at https://github.com/shindyu/XCTestExtensions\n\n# License\nXCTestExtensions is available as open source under the terms of the [MIT License](https://github.com/shindyu/XCTestExtensions/blob/master/LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshindyu%2FXCTestExtensions","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshindyu%2FXCTestExtensions","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshindyu%2FXCTestExtensions/lists"}