{"id":13659152,"url":"https://github.com/lupuuss/Mokkery","last_synced_at":"2025-04-24T12:31:01.218Z","repository":{"id":179949720,"uuid":"652785006","full_name":"lupuuss/Mokkery","owner":"lupuuss","description":"The mocking library for Kotlin Multiplatform, easy to use, boilerplate-free and compiler plugin driven.","archived":false,"fork":false,"pushed_at":"2024-10-30T00:44:34.000Z","size":3529,"stargazers_count":188,"open_issues_count":9,"forks_count":8,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-10-30T02:51:01.086Z","etag":null,"topics":["ir","k2","kmp","kotlin","kotlin-compiler-plugin","kotlin-multiplatform","kotlin-multiplatform-mobile","mock","test"],"latest_commit_sha":null,"homepage":"https://mokkery.dev","language":"Kotlin","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/lupuuss.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":"2023-06-12T19:45:23.000Z","updated_at":"2024-10-29T07:19:46.000Z","dependencies_parsed_at":"2024-01-17T20:34:12.128Z","dependency_job_id":"90c6ae92-6b2d-4d70-9a9a-5a56897cbcaf","html_url":"https://github.com/lupuuss/Mokkery","commit_stats":null,"previous_names":["lupuuss/mokkery"],"tags_count":22,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lupuuss%2FMokkery","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lupuuss%2FMokkery/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lupuuss%2FMokkery/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lupuuss%2FMokkery/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lupuuss","download_url":"https://codeload.github.com/lupuuss/Mokkery/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223952686,"owners_count":17230933,"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":["ir","k2","kmp","kotlin","kotlin-compiler-plugin","kotlin-multiplatform","kotlin-multiplatform-mobile","mock","test"],"created_at":"2024-08-02T05:01:05.691Z","updated_at":"2025-04-24T12:31:01.208Z","avatar_url":"https://github.com/lupuuss.png","language":"Kotlin","funding_links":[],"categories":["Libraries","Kotlin"],"sub_categories":["🩺 Test"],"readme":"\u003cdiv align=\"center\"\u003e\n    \u003ca href=\"https://mokkery.dev\"\u003e\n        \u003cimg src=\"./website/static/img/logo-github.png\" alt=\"Mokkery\" /\u003e\n    \u003c/a\u003e\n\u003c/div\u003e\n\n\u003c/br\u003e\n\u003c/br\u003e\n\n[![Gradle Plugin Portal Stable](https://img.shields.io/gradle-plugin-portal/v/dev.mokkery)](https://plugins.gradle.org/plugin/dev.mokkery)\n[![Kotlin](https://img.shields.io/badge/kotlin-2.1.20-blue.svg?logo=kotlin)](http://kotlinlang.org)\n[![GitHub](https://img.shields.io/github/license/lupuuss/Mokkery)](https://github.com/lupuuss/Mokkery/blob/main/LICENSE)\n[![Docs](https://img.shields.io/static/v1?label=api\u0026message=reference\u0026labelColor=gray\u0026color=blueviolet\u0026logo=gitbook\u0026logoColor=white)](https://mokkery.dev/api_reference)\n\nThe mocking library for Kotlin Multiplatform, easy to use, boilerplate-free and compiler plugin driven.\n\n```kotlin\nclass BookServiceTest {\n\n    val repository = mock\u003cBookRepository\u003e {\n        everySuspend { findById(any()) } calls { (id: String) -\u003e Book(id) }\n    }\n    val service = BookService(repository)\n\n    @Test\n    fun `rent should call repository for each book`() = runTest {\n        service.rentAll(listOf(\"1\", \"2\"))\n        verifySuspend(exhaustiveOrder) {\n            repository.findById(\"1\")\n            repository.findById(\"2\")\n        }\n    }\n}\n```\n\nAs shown in the example above, this library is highly inspired by the [MockK](https://mockk.io).\nIf you have any experience with MockK, it should be easy to start with Mokkery!\n\n### [Documentation is available here!](https://mokkery.dev/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flupuuss%2FMokkery","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flupuuss%2FMokkery","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flupuuss%2FMokkery/lists"}