{"action":"opened","issue":{"url":"https://api.github.com/repos/CompuIves/codesandbox-client/issues/1031","repository_url":"https://api.github.com/repos/CompuIves/codesandbox-client","labels_url":"https://api.github.com/repos/CompuIves/codesandbox-client/issues/1031/labels{/name}","comments_url":"https://api.github.com/repos/CompuIves/codesandbox-client/issues/1031/comments","events_url":"https://api.github.com/repos/CompuIves/codesandbox-client/issues/1031/events","html_url":"https://github.com/CompuIves/codesandbox-client/issues/1031","id":348446761,"node_id":"MDU6SXNzdWUzNDg0NDY3NjE=","number":1031,"title":"Components rendered in tests using `react-testing-library` show up in the preview.","user":{"login":"ainsleymcgrath","id":25474239,"node_id":"MDQ6VXNlcjI1NDc0MjM5","avatar_url":"https://avatars2.githubusercontent.com/u/25474239?v=4","gravatar_id":"","url":"https://api.github.com/users/ainsleymcgrath","html_url":"https://github.com/ainsleymcgrath","followers_url":"https://api.github.com/users/ainsleymcgrath/followers","following_url":"https://api.github.com/users/ainsleymcgrath/following{/other_user}","gists_url":"https://api.github.com/users/ainsleymcgrath/gists{/gist_id}","starred_url":"https://api.github.com/users/ainsleymcgrath/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ainsleymcgrath/subscriptions","organizations_url":"https://api.github.com/users/ainsleymcgrath/orgs","repos_url":"https://api.github.com/users/ainsleymcgrath/repos","events_url":"https://api.github.com/users/ainsleymcgrath/events{/privacy}","received_events_url":"https://api.github.com/users/ainsleymcgrath/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-08-07T18:58:38Z","updated_at":"2018-08-07T18:58:38Z","closed_at":null,"author_association":"NONE","body":"# 🐛 bug report\r\n\r\n## Description of the problem\r\n## How has this issue affected you? What are you trying to accomplish?\r\nI'm testing components in a React prototype using `react-testing-library`. When I call the `render` method in a test like so: \r\n\r\n```javascript\r\ndescribe(\"A single nudge component\", () => {\r\n  const { container } = render(<Nudge colorPart=\"g\" />);\r\n  it(\"Renders with a number in the field\", () => {\r\n    const input = container.querySelector(\"input\");\r\n    expect(typeof parseInt(input)).toBe(\"number\");\r\n  });\r\n});\r\n```\r\n\r\nthe rendered `<Nudge/>` component actually appears in the preview below my app. Every time the test re-runs, it appends another instance of the component.\r\n\r\nThere is a solid chance I'm just overlooking something noob-y here, so thanks for taking the time to look at this if it proves to be a non-issue. Also thanks for this great product!! Loving it so far.\r\n\r\n###  Link to sandbox: [link](https://codesandbox.io/s/z3o6w3wpyl)\r\n### Your Environment\r\n| Software         | Name/Version|\r\n| ---------------- | ---------- |\r\n| Сodesandbox  | PROD-1533293248-4a97495 |\r\n| Browser |  Chrome 67.0.3396.99 (Official Build) (64-bit) |\r\n| Operating System | Windows 10 (and also macOS  10.13.6) |\r\n\r\n#### With the test commented out:\r\n![image](https://user-images.githubusercontent.com/25474239/43796393-c5b4731c-9a49-11e8-8b7e-2e86af7a74d4.png)\r\n\r\n#### WIth the test having run once: \r\n![image](https://user-images.githubusercontent.com/25474239/43796414-db9a433c-9a49-11e8-9896-02766ef0e1fa.png)\r\n"}}
{"actor":{"display_login":"ainsleymcgrath"}}