{"id":13847273,"url":"https://github.com/omermorad/mockingbird","last_synced_at":"2025-07-17T18:35:29.079Z","repository":{"id":37801117,"uuid":"329667243","full_name":"omermorad/mockingbird","owner":"omermorad","description":"🐦 Decorator Powered TypeScript Library for Creating Mocks","archived":false,"fork":false,"pushed_at":"2024-06-02T03:38:26.000Z","size":1211,"stargazers_count":90,"open_issues_count":6,"forks_count":5,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-03T20:40:49.550Z","etag":null,"topics":["faker","faker-typescript","fakerjs","fixture","fixtures","mock","mock-library","mocking","mocks","test","testing","typescript","unit-test"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/omermorad.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":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-01-14T16:11:16.000Z","updated_at":"2025-05-22T16:46:04.000Z","dependencies_parsed_at":"2024-06-18T23:10:20.541Z","dependency_job_id":null,"html_url":"https://github.com/omermorad/mockingbird","commit_stats":{"total_commits":143,"total_committers":6,"mean_commits":"23.833333333333332","dds":0.09790209790209792,"last_synced_commit":"421428336b06b0353dcb9a53c7f0c344bd03c95a"},"previous_names":["omermorad/faker.ts","omermorad/mockingbird-ts"],"tags_count":88,"template":false,"template_full_name":null,"purl":"pkg:github/omermorad/mockingbird","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omermorad%2Fmockingbird","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omermorad%2Fmockingbird/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omermorad%2Fmockingbird/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omermorad%2Fmockingbird/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/omermorad","download_url":"https://codeload.github.com/omermorad/mockingbird/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omermorad%2Fmockingbird/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265645580,"owners_count":23804191,"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":["faker","faker-typescript","fakerjs","fixture","fixtures","mock","mock-library","mocking","mocks","test","testing","typescript","unit-test"],"created_at":"2024-08-04T18:01:15.242Z","updated_at":"2025-07-17T18:35:29.030Z","avatar_url":"https://github.com/omermorad.png","language":"TypeScript","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"readme":"[![ISC license](http://img.shields.io/badge/license-MIT-brightgreen.svg)](http://opensource.org/licenses/MIT)\n[![npm version](http://img.shields.io/npm/v/mockingbird.svg?style=flat)](https://npmjs.org/package/mockingbird \"View this project on npm\")\n[![Codecov Coverage](https://img.shields.io/codecov/c/github/omermorad/mockingbird/master.svg?style=flat-square)](https://codecov.io/gh/omermorad/mockingbird)\n[![lerna](https://img.shields.io/badge/maintained%20with-lerna-cc00ff.svg)](https://lerna.js.org/)\n[![ci](https://github.com/omermorad/mockingbird/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/omermorad/mockingbird/actions)\n\n\u003cp align=\"center\"\u003e\n  \u003cimg width=\"450\" src=\"https://raw.githubusercontent.com/omermorad/mockingbird/master/docs/logo.png\" alt=\"Mockingbird Logo\" /\u003e\n\n  \u003ch1 align=\"center\"\u003eMockingbird\u003c/h1\u003e\n\n  \u003ch3 align=\"center\"\u003e\n    Simple Yet Powerful TypeScript Mocking Library\n  \u003c/h3\u003e\n\n  \u003ch4 align=\"center\"\u003e\n    Manage and create your test mocks easily, and focus on your tests logic instead\n  \u003c/h4\u003e\n\u003c/p\u003e\n\n## Installation\n\n```bash\nnpm i -D mockingbird\n```\n\n```bash\nyarn add -D mockingbird\n```\n\n## What is \"Mocking Library\"?\nA lot of times you find yourself “preparing” some dummy data for your tests that\nhas to make sense for a specific test case(s) and is manipulated often.\nSome developers are preparing JSON files, others create a long verbose object in\nthe test file itself, but the outcome always contains some fake data inside\n(or even a snapshot from an external API).\n\nThis is what Mockingbird aims to solve!\nIt suggests two ways of creating mocks for your entities/models classes, thus,\ncreating one uniform way to manage mocks (whether you are working alone or with your team),\nyour dev experience will improve, and you won’t have to deal with this messy setup at all!\n\n## Features\n- Prepare as many unique mocks/fixtures as you need for your tests\n- Generate dummy (but reasonable) data for database seeding\n- Manage your mocks from one place, forget about the messy work\n- Full TypeScript compatibility\n- Convenient and simple API\n\n## Usage\n\n**Here is the simplest usage of Mockingbird:**\n\n```typescript\n// Could be interface as well\nclass BirdEntity {\n  name: string;\n  birthday: Date;\n  goodPoints: number;\n}\n```\n\n```typescript\nimport { Mock, MockFactory } from 'mockingbird';\n\n// BirdEntity could be an interface or a class\nclass BirdEntityMock implements BirdEntity {\n  @Mock(faker =\u003e faker.name.firstName())\n  name!: string;\n\n  @Mock()\n  birthday!: Date; // Will generate a recent date\n\n  @Mock()\n  goodPoints!: number; // Will generate a random number\n}\n\nconst oneBird = MockFactory(BirdEntityMock).one();\nconst lotsOfBirds = MockFactory(BirdEntityMock).many(3);\n```\n\n## Documentation\n**[Jump to the full documentation and explore the full API](https://github.com/omermorad/faker.ts/blob/master/docs/README.md)**\n\n**There's also an example, [you can find it under the sample folder](https://github.com/omermorad/mockingbird/tree/master/sample)**\n\n## Playground\n\n**Jump to the [REPL Playground](https://repl.it/@omermorad/Mockingbird-Playground) where you can see Mockingbird in action!**\n\n## Motivation\n\nCreating mocks for your tests (sometimes called \"fixtures\") can be a tedious and\ncumbersome process usually done manually.\n\nWe came up with a simple yet super convenient solution: all you have to do to get mocks out of the\nbox is to decorate your classes (whether it's an entity, or a model representing the database layer)\nand generate simple or complex mocks.\n\nMockingbird offers two different ways for preparing mocks; The first one (as we call it), is the TypeScript\nway which requires decorating existing (or duplicate) classes.\nThe second way is to use Mockingbird's functionality directly\n\n\n### What is `faker.js`?\n\n`faker.js` it's a library which is used to \"generate massive amounts of fake data in the browser and Node\".\n\nMockingbird uses `faker.js` under the hood, making it possible to enjoy its rich database, and thereby allows\nto create mocks that are meaningful like email, first name, address and many more.\n\n## License\n\nDistributed under the MIT License. See `LICENSE` for more information.\n\n## Acknowledgements\n\n[faker.js](https://github.com/marak/Faker.js)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fomermorad%2Fmockingbird","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fomermorad%2Fmockingbird","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fomermorad%2Fmockingbird/lists"}