{"id":28550626,"url":"https://github.com/dropbox/storekittesthelpers","last_synced_at":"2025-08-12T16:06:13.352Z","repository":{"id":280180321,"uuid":"938411797","full_name":"dropbox/StoreKitTestHelpers","owner":"dropbox","description":"StoreKitTestHelpers is a little utility to help reduce test flakiness when using StoreKitTest","archived":false,"fork":false,"pushed_at":"2025-02-27T19:58:17.000Z","size":8,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-10T10:41:59.350Z","etag":null,"topics":["storekit","storekittest"],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dropbox.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,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-02-24T23:08:11.000Z","updated_at":"2025-05-29T14:09:08.000Z","dependencies_parsed_at":"2025-03-01T23:15:28.126Z","dependency_job_id":null,"html_url":"https://github.com/dropbox/StoreKitTestHelpers","commit_stats":null,"previous_names":["dropbox/storekittesthelpers"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/dropbox/StoreKitTestHelpers","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dropbox%2FStoreKitTestHelpers","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dropbox%2FStoreKitTestHelpers/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dropbox%2FStoreKitTestHelpers/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dropbox%2FStoreKitTestHelpers/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dropbox","download_url":"https://codeload.github.com/dropbox/StoreKitTestHelpers/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dropbox%2FStoreKitTestHelpers/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270091553,"owners_count":24525216,"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-08-12T02:00:09.011Z","response_time":80,"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":["storekit","storekittest"],"created_at":"2025-06-10T03:09:48.180Z","updated_at":"2025-08-12T16:06:13.336Z","avatar_url":"https://github.com/dropbox.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# StoreKitTestHelpers\n\nStoreKitTestHelpers is a little utility to help reduce test flakiness when using StoreKitTest. \n\nThe root of the problem seems to be that Apple's StoreKitTest mock server sometimes does not get shut down properly between test runs, and can alternate between the correct response and stale incorrect response. This package provides some helpers to spin until StoreKit returns consistent results (by default, 3 times in a row).\n\n## Installation\n\n### Swift Package Manager\n\nAdd the following to your `Package.swift` file:\n\n```swift\n.package(url: \"https://github.com/dropbox/StoreKitTestHelpers.git\", .upToNextMajor(from: \"1.0.0\")),\n```\n\n## Usage\n\n```swift\nimport StoreKitTest\nimport StoreKitTestHelpers\n\nfunc testBlockingExample() {\n    // set up your test session\n    let skTestSession = try SKTestSession.clearedNonInteractiveSession() \n    // buys product and waits until StoreKit has expected auto-renewable subscription\n    try await skTestSession.buyProductAndWait(identifier: \"com.example.product\")\n    // alternatively - make purchase other ways and wait\n    try await skTestSession.spinUntilActiveAutoRenewableProductIdsContains(\"com.example.product\")\n    \n    // you can also wait until arbitrary conditions are met X times in a row\n    try await Task.spinUntilCondition {\n        await example.shouldBlockPurchase()\n    }\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdropbox%2Fstorekittesthelpers","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdropbox%2Fstorekittesthelpers","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdropbox%2Fstorekittesthelpers/lists"}