{"id":18809897,"url":"https://github.com/bytebit-org/fitumi","last_synced_at":"2025-04-13T20:29:36.865Z","repository":{"id":54257134,"uuid":"253526088","full_name":"Bytebit-Org/fitumi","owner":"Bytebit-Org","description":"Fake It 'Till You Make It - A unit testing utility for faking dependencies in Lua","archived":false,"fork":false,"pushed_at":"2024-04-16T06:42:53.000Z","size":204,"stargazers_count":13,"open_issues_count":1,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-11-07T00:08:49.943Z","etag":null,"topics":["fake","lua","mocking","roblox","roblox-ts","unit-test"],"latest_commit_sha":null,"homepage":"","language":"Lua","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/Bytebit-Org.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-04-06T14:42:56.000Z","updated_at":"2023-11-29T04:17:35.000Z","dependencies_parsed_at":"2024-04-16T07:38:12.860Z","dependency_job_id":"e187611e-b652-4c10-86cb-532fd42f367e","html_url":"https://github.com/Bytebit-Org/fitumi","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bytebit-Org%2Ffitumi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bytebit-Org%2Ffitumi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bytebit-Org%2Ffitumi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bytebit-Org%2Ffitumi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Bytebit-Org","download_url":"https://codeload.github.com/Bytebit-Org/fitumi/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223602806,"owners_count":17171990,"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":["fake","lua","mocking","roblox","roblox-ts","unit-test"],"created_at":"2024-11-07T23:18:08.380Z","updated_at":"2024-11-07T23:18:09.218Z","avatar_url":"https://github.com/Bytebit-Org.png","language":"Lua","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Fake It 'Till You Make It\n\u003cp align=\"center\"\u003e\n\t\u003ca href=\"https://github.com/Bytebit-Org/fitumi/actions\"\u003e\n        \u003cimg src=\"https://github.com/Bytebit-Org/fitumi/workflows/CI/badge.svg\" alt=\"CI status\" /\u003e\n    \u003c/a\u003e\n\t\u003ca href=\"http://makeapullrequest.com\"\u003e\n\t\t\u003cimg src=\"https://img.shields.io/badge/PRs-welcome-blue.svg\" alt=\"PRs Welcome\" /\u003e\n\t\u003c/a\u003e\n\t\u003ca href=\"https://opensource.org/licenses/MIT\"\u003e\n\t\t\u003cimg src=\"https://img.shields.io/badge/License-MIT-blue.svg\" alt=\"License: MIT\" /\u003e\n\t\u003c/a\u003e\n\t\u003ca href=\"https://discord.gg/QEz3v8y\"\u003e\n\t\t\u003cimg src=\"https://img.shields.io/badge/discord-join-7289DA.svg?logo=discord\u0026longCache=true\u0026style=flat\" alt=\"Discord server\" /\u003e\n\t\u003c/a\u003e\n\u003c/p\u003e\n\nFake It 'Till You Make It, or fitumi, is a Lua faking library intended for helping to create comprehensive unit tests for Lua code bases. While not required, fitumi was designed with Roblox development as the primary use-case. Fitumi's design is inspired in part by [FakeItEasy](https://fakeiteasy.github.io/).\n\nFitumi comes paired with TypeScript annotation files for easy installation into a roblox-ts project and is published to NPM under the [@rbxts/fitumi](https://www.npmjs.com/package/@rbxts/fitumi) package.\n\n## Installation\n### roblox-ts\nSimply install to your [roblox-ts](https://roblox-ts.com/) project as follows:\n```\nnpm i @rbxts/fitumi\n```\n\n### Wally\n[Wally](https://github.com/UpliftGames/wally/) users can install this package by adding the following line to their `Wally.toml` under `[dependencies]`:\n```\nfitumi = \"bytebit/fitumi@1.0.11\"\n```\n\nThen just run `wally install`.\n\n### From model file\nModel files are uploaded to every release as `.rbxmx` files. You can download the file from the [Releases page](https://github.com/Bytebit-Org/fitumi/releases) and load it into your project however you see fit.\n\n### From model asset\nNew versions of the asset are uploaded with every release. The asset can be added to your Roblox Inventory and then inserted into your Place via Toolbox by getting it [here.](https://www.roblox.com/library/7881397561/fitumi-Package)\n\n## Links\n- [API Documentation](DOCUMENTATION.md)\n\n## Example\n```lua\nlocal fitumi = require(path.to.fitumi)\nlocal a = fitumi.a\n\nlocal fakeDependency = a.fake()\na.callTo(fakeDependency[\"foo\"], fakeDependency, fitumi.wildcard):returns(\"bar\")\n\nlocal targetObject = TargetClass.new(fakeDependency)\ntargetObject:doSomething()\n\nassert(a.callTo(fakeDependency[\"foo\"], fakeDependency, fitumi.wildcard):didHappen(), \"No call to foo happened\")\nassert(targetObject.fooResult == \"bar\", \"targetObject's foo result does not match provided foo result\")\nassert(a.writeTo(fakeDependency, \"expectedKey\", \"expectedValue\"):didHappen(), \"targetObject did not write \\\"expectedValue\\\" to \\\"expectedKey\\\"\")\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbytebit-org%2Ffitumi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbytebit-org%2Ffitumi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbytebit-org%2Ffitumi/lists"}