{"id":17255670,"url":"https://github.com/ffmathy/fluffyspoon.javascript.testing.autofake","last_synced_at":"2026-01-20T02:46:50.612Z","repository":{"id":33117809,"uuid":"146135868","full_name":"ffMathy/FluffySpoon.JavaScript.Testing.Autofake","owner":"ffMathy","description":null,"archived":false,"fork":false,"pushed_at":"2023-12-29T19:28:33.000Z","size":217,"stargazers_count":1,"open_issues_count":5,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-04-13T21:57:47.751Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ffMathy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2018-08-25T23:09:17.000Z","updated_at":"2021-07-01T04:55:19.000Z","dependencies_parsed_at":"2022-07-27T19:48:54.479Z","dependency_job_id":"e82cf7a4-3aa3-488b-8832-f1fd15e7a19b","html_url":"https://github.com/ffMathy/FluffySpoon.JavaScript.Testing.Autofake","commit_stats":{"total_commits":63,"total_committers":2,"mean_commits":31.5,"dds":0.2222222222222222,"last_synced_commit":"ac1b883465ed930b33fae6cb10163f95024305ac"},"previous_names":[],"tags_count":39,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ffMathy%2FFluffySpoon.JavaScript.Testing.Autofake","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ffMathy%2FFluffySpoon.JavaScript.Testing.Autofake/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ffMathy%2FFluffySpoon.JavaScript.Testing.Autofake/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ffMathy%2FFluffySpoon.JavaScript.Testing.Autofake/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ffMathy","download_url":"https://codeload.github.com/ffMathy/FluffySpoon.JavaScript.Testing.Autofake/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247457742,"owners_count":20941906,"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":[],"created_at":"2024-10-15T07:12:17.674Z","updated_at":"2026-01-20T02:46:50.585Z","avatar_url":"https://github.com/ffMathy.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"`@fluffy-spoon/autofake` will automatically inject fakes for your constructor arguments. Perfect for quick and easy unit testing!\n\n# Example\nThe following example uses `inverse.js` as IOC container.\n\n```typescript\nimport Autofaker from '@fluffy-spoon/autofake';\n\nimport { Injectable, Inject, Container } from '@fluffy-spoon/inverse';\nimport InverseProvider from '@fluffy-spoon/autofake-inverse';\n\nconst faker = new Autofaker();\n\nconst container = new Container();\nfaker.useInversionOfControlProvider(new InverseProvider(container));\n\n\n@Injectable\nexport class Bar {\n  say() {\n    return 'hello world';\n  }\n}\n\n@Injectable\nexport class Foo {\n  constructor(@Inject public bar: Bar) {\n  }\n\n  doStuff() {\n    console.log('says', this.bar.say());\n  }\n}\n\n\nfaker.registerFakesForConstructorParameterTypesOf(Foo);\n\nconst fakeBar = faker.resolveFakeInstance(Bar);\nfakeBar.say().returns('foo');\n\nconst realFoo = faker.resolveInstance(Foo);\nrealFoo.doStuff(); //will execute console.log('says', 'foo')\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fffmathy%2Ffluffyspoon.javascript.testing.autofake","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fffmathy%2Ffluffyspoon.javascript.testing.autofake","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fffmathy%2Ffluffyspoon.javascript.testing.autofake/lists"}