{"action":"created","issue":{"url":"https://api.github.com/repos/producthunt/chai-enzyme/issues/134","repository_url":"https://api.github.com/repos/producthunt/chai-enzyme","labels_url":"https://api.github.com/repos/producthunt/chai-enzyme/issues/134/labels{/name}","comments_url":"https://api.github.com/repos/producthunt/chai-enzyme/issues/134/comments","events_url":"https://api.github.com/repos/producthunt/chai-enzyme/issues/134/events","html_url":"https://github.com/producthunt/chai-enzyme/issues/134","id":195011689,"number":134,"title":"text(str) assertion doesn't support custom component","user":{"login":"ZaherMustapha","id":23743998,"avatar_url":"https://avatars.githubusercontent.com/u/23743998?v=3","gravatar_id":"","url":"https://api.github.com/users/ZaherMustapha","html_url":"https://github.com/ZaherMustapha","followers_url":"https://api.github.com/users/ZaherMustapha/followers","following_url":"https://api.github.com/users/ZaherMustapha/following{/other_user}","gists_url":"https://api.github.com/users/ZaherMustapha/gists{/gist_id}","starred_url":"https://api.github.com/users/ZaherMustapha/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ZaherMustapha/subscriptions","organizations_url":"https://api.github.com/users/ZaherMustapha/orgs","repos_url":"https://api.github.com/users/ZaherMustapha/repos","events_url":"https://api.github.com/users/ZaherMustapha/events{/privacy}","received_events_url":"https://api.github.com/users/ZaherMustapha/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2016-12-12T16:00:56Z","updated_at":"2016-12-12T16:33:35Z","closed_at":null,"body":"For example:\r\n<CardText>A Number: {card.number}</CardText>\r\n\r\nIf I write the test for the previous JSX code:\r\n```js\r\nit('should have a CardText displaying A Number', () => {\r\n    const cardTextNumber = component.find('CardText')\r\n    expect(cardTextNumber).to.have.text('A Number: 1234')\r\n})\r\n```\r\nSadly, it seems like custom components are not supported. I am getting the following error: \r\n\r\nexpected the node in <Container /> to have text 'A Number: 1234', but it has '<CardText />'"},"comment":{"url":"https://api.github.com/repos/producthunt/chai-enzyme/issues/comments/266478767","html_url":"https://github.com/producthunt/chai-enzyme/issues/134#issuecomment-266478767","issue_url":"https://api.github.com/repos/producthunt/chai-enzyme/issues/134","id":266478767,"user":{"login":"ljharb","id":45469,"avatar_url":"https://avatars.githubusercontent.com/u/45469?v=3","gravatar_id":"","url":"https://api.github.com/users/ljharb","html_url":"https://github.com/ljharb","followers_url":"https://api.github.com/users/ljharb/followers","following_url":"https://api.github.com/users/ljharb/following{/other_user}","gists_url":"https://api.github.com/users/ljharb/gists{/gist_id}","starred_url":"https://api.github.com/users/ljharb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ljharb/subscriptions","organizations_url":"https://api.github.com/users/ljharb/orgs","repos_url":"https://api.github.com/users/ljharb/repos","events_url":"https://api.github.com/users/ljharb/events{/privacy}","received_events_url":"https://api.github.com/users/ljharb/received_events","type":"User","site_admin":false},"created_at":"2016-12-12T16:33:35Z","updated_at":"2016-12-12T16:33:35Z","body":"If there are 3 CardText components, you can't validate them. Add an assertion in your test that you've only found 1 item, and *then* you'll be able to assert things on it. "}}
{"actor":{"display_login":"ljharb"}}