{"id":16234139,"url":"https://github.com/zackify/react-easy-test","last_synced_at":"2025-04-08T07:41:45.957Z","repository":{"id":72855684,"uuid":"46315700","full_name":"zackify/react-easy-test","owner":"zackify","description":"need a better name... scroll down and see what this is!","archived":false,"fork":false,"pushed_at":"2015-11-17T01:45:08.000Z","size":2,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-14T04:49:48.022Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/zackify.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}},"created_at":"2015-11-17T01:43:36.000Z","updated_at":"2016-10-29T01:00:53.000Z","dependencies_parsed_at":"2023-03-09T01:45:45.599Z","dependency_job_id":null,"html_url":"https://github.com/zackify/react-easy-test","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zackify%2Freact-easy-test","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zackify%2Freact-easy-test/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zackify%2Freact-easy-test/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zackify%2Freact-easy-test/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zackify","download_url":"https://codeload.github.com/zackify/react-easy-test/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247800865,"owners_count":20998331,"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-10T13:15:08.549Z","updated_at":"2025-04-08T07:41:45.933Z","avatar_url":"https://github.com/zackify.png","language":"JavaScript","readme":"##Test React Components with Decorators\n\n**Note** this is a demo, and a poorly written one at that! Just wanted to show off the concept.\n\n```js\nimport React from 'react'\nimport test from './src/test'\n\n@test({\n  name: 'bob'\n},\n{\n  children: 'BOB',\n})\nexport default class Test extends React.Component{\n  render(){\n    return (\n      \u003cdiv\u003e\n        {this.props.name.toUpperCase()}\n      \u003c/div\u003e\n    )\n  }\n}\n```\n\nThe goal is to test your components as you write them. Useful for props-only components. This is way too basic right now, only a demo. If you like the idea, please let me know! This idea popped into my head and I made it in an hour.\n\n##Problems:\n\n- Decorator needs to be removed unless testing.\n\nI have an easy fix in my head, a webpack loader that strips it unless running tests. Or, add the decorator as a comment, and strip the comments when testing.\n\n- You have to write the tests still.\n\nI would like to have a wrapper around mocha that makes them for you, but right now you have to add a test like so:\n\n```js\nimport Component from './component'\nimport { expect } from 'chai'\n\ndescribe('Test Component', function() {\n  it('Should pass tests correctly', function () {\n    expect(Component).to.equal(true);\n  });\n});\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzackify%2Freact-easy-test","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzackify%2Freact-easy-test","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzackify%2Freact-easy-test/lists"}