{"id":19543106,"url":"https://github.com/batterii/fixture-riveter","last_synced_at":"2025-04-26T17:31:46.180Z","repository":{"id":41603343,"uuid":"267859099","full_name":"Batterii/fixture-riveter","owner":"Batterii","description":"A fixtures generation library for Typescript","archived":false,"fork":false,"pushed_at":"2023-07-07T16:49:07.000Z","size":1275,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-10-11T18:18:34.151Z","etag":null,"topics":["factory-bot","fixture-data","fixture-generator","fixture-riveter","fixtures"],"latest_commit_sha":null,"homepage":"https://batterii.github.io/fixture-riveter/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Batterii.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-05-29T13:01:53.000Z","updated_at":"2023-08-11T16:25:37.000Z","dependencies_parsed_at":"2022-08-10T04:52:29.284Z","dependency_job_id":null,"html_url":"https://github.com/Batterii/fixture-riveter","commit_stats":null,"previous_names":[],"tags_count":27,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Batterii%2Ffixture-riveter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Batterii%2Ffixture-riveter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Batterii%2Ffixture-riveter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Batterii%2Ffixture-riveter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Batterii","download_url":"https://codeload.github.com/Batterii/fixture-riveter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224040372,"owners_count":17245758,"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":["factory-bot","fixture-data","fixture-generator","fixture-riveter","fixtures"],"created_at":"2024-11-11T03:17:20.246Z","updated_at":"2024-11-11T03:17:20.901Z","avatar_url":"https://github.com/Batterii.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# fixture-riveter\n\n[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)][github license]\n[![npm version](https://img.shields.io/npm/v/fixture-riveter)][npm version]\n[![Mutation testing badge](https://img.shields.io/endpoint?style=flat\u0026url=https%3A%2F%2Fbadge-api.stryker-mutator.io%2Fgithub.com%2FBatterii%2Ffixture-riveter%2Fmaster)][stryker]\n![Test status](https://img.shields.io/github/workflow/status/Batterii/fixture-riveter/tests)\n[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)][mapr]\n\n[github license]: https://github.com/Batterii/fixture-riveter/blob/master/LICENSE\n[npm version]: https://www.npmjs.com/package/fixture-riveter\n[stryker]: https://dashboard.stryker-mutator.io/reports/github.com/Batterii/fixture-riveter/master\n[mapr]: http://makeapullrequest.com\n\nfixture-riveter is a fixtures replacement library based on thoughtbot's excellent ruby\nlibrary [factory_bot][factory_bot], with some ideas adapted from\n[factory-girl][factory-girl], another javascript library inspired by factory_bot. It's\nwritten in Typescript, is fully async, and implements nearly all of factory_bot's\nfeatures.\n\n[factory_bot]: https://github.com/thoughtbot/factory_bot/\n[factory-girl]: https://github.com/simonexmachina/factory-girl\n\nIt was built for a knex/objection.js codebase and thus the integration with that ORM is\nthe best. It has support for other ORMs through the use of adapters, but some of the\nfeatures don't work as well or at all with them.\n\n## Installation\n\nNode.js:\n\n```bash\nnpm install --save-dev fixture-riveter\n```\n\n## Documentation\n\nA complete guide to using fixture-riveter can be found in the [guide][guide]. For those\ninterested in code first, here is a simple demonstration:\n\n[guide]: https://batterii.github.io/fixture-riveter\n\n```typescript\nimport {fr, ObjectionAdapter} from \"fixture-riveter\";\n\nfr.setAdapter(new ObjectionAdapter());\n\nfr.fixture(User, (f) =\u003e {\n    f.name(() =\u003e \"Noah\");\n    f.age(() =\u003e 32);\n    f.sequence(\"email\", (n) =\u003e `test${n}@example.com`);\n});\n\nconst user = await fr.create(User, {name: \"Bogart\"});\n\nexpect(user).to.be.an.instanceof(User);\nexpect(user.id).to.exist;\nexpect(user.name).to.equal(\"Bogart\");\nexpect(user.age).to.equal(32);\nexpect(user.email).to.equal(\"test1@example.com\");\n```\n\n## Contributing\n\nAs this is a very young library, there will be plenty of places it could be improved. No\nPR is too small, no issue is too weird or out of bounds. Please adhere to our [Code of\nConduct][coc] when participating with this project.\n\n[coc]: CODE_OF_CONDUCT.md\n\n## License\n\nCopyright © 2021 Noah Bogart and Batterii, distributed under the license in\n[LICENSE](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbatterii%2Ffixture-riveter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbatterii%2Ffixture-riveter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbatterii%2Ffixture-riveter/lists"}