{"action":"created","issue":{"url":"https://api.github.com/repos/styled-components/jest-styled-components/issues/5","repository_url":"https://api.github.com/repos/styled-components/jest-styled-components","labels_url":"https://api.github.com/repos/styled-components/jest-styled-components/issues/5/labels{/name}","comments_url":"https://api.github.com/repos/styled-components/jest-styled-components/issues/5/comments","events_url":"https://api.github.com/repos/styled-components/jest-styled-components/issues/5/events","html_url":"https://github.com/styled-components/jest-styled-components/issues/5","id":222648197,"number":5,"title":"Should this work with styled-components v2?","user":{"login":"ismay","id":7355199,"avatar_url":"https://avatars2.githubusercontent.com/u/7355199?v=3","gravatar_id":"","url":"https://api.github.com/users/ismay","html_url":"https://github.com/ismay","followers_url":"https://api.github.com/users/ismay/followers","following_url":"https://api.github.com/users/ismay/following{/other_user}","gists_url":"https://api.github.com/users/ismay/gists{/gist_id}","starred_url":"https://api.github.com/users/ismay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ismay/subscriptions","organizations_url":"https://api.github.com/users/ismay/orgs","repos_url":"https://api.github.com/users/ismay/repos","events_url":"https://api.github.com/users/ismay/events{/privacy}","received_events_url":"https://api.github.com/users/ismay/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2017-04-19T07:44:02Z","updated_at":"2017-04-28T15:35:18Z","closed_at":null,"body":"Since 1.4 is listed as a peerdependency I'm assuming it's only meant to work with v1. I'm asking because I'm using v2 and would like to use this lib as well, but I've been running into some issues (window is not defined on CI tests, even with `testEnvironment: node`). Wondering if that's expected because it isn't officially supported, or that I'm doing something wrong."},"comment":{"url":"https://api.github.com/repos/styled-components/jest-styled-components/issues/comments/298031147","html_url":"https://github.com/styled-components/jest-styled-components/issues/5#issuecomment-298031147","issue_url":"https://api.github.com/repos/styled-components/jest-styled-components/issues/5","id":298031147,"user":{"login":"Thr44","id":1564286,"avatar_url":"https://avatars0.githubusercontent.com/u/1564286?v=3","gravatar_id":"","url":"https://api.github.com/users/Thr44","html_url":"https://github.com/Thr44","followers_url":"https://api.github.com/users/Thr44/followers","following_url":"https://api.github.com/users/Thr44/following{/other_user}","gists_url":"https://api.github.com/users/Thr44/gists{/gist_id}","starred_url":"https://api.github.com/users/Thr44/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Thr44/subscriptions","organizations_url":"https://api.github.com/users/Thr44/orgs","repos_url":"https://api.github.com/users/Thr44/repos","events_url":"https://api.github.com/users/Thr44/events{/privacy}","received_events_url":"https://api.github.com/users/Thr44/received_events","type":"User","site_admin":false},"created_at":"2017-04-28T15:35:18Z","updated_at":"2017-04-28T15:35:18Z","body":"Hi, \r\n\r\nI'm getting an issue that an error is thrown, whether I use \"testEnvironment\": \"node\" or not, when I call :\r\n`toMatchStyledComponentsSnapshot()` I get:\r\n\r\n`TypeError: styleSheet.rules is not a function`\r\n\r\nhere's a complete test that is failing:\r\n\r\n```\r\nimport React from 'react';\r\nimport renderer from 'react-test-renderer';\r\nimport styled from 'styled-components';\r\n\r\ndescribe('styled Component Tests', () => {\r\n\r\n  it('should render a styled h4', () => {\r\n    const iconStyles = `\r\n      margin-left: -2px;\r\n      margin-right: 4px;\r\n      margin-top: -3px;\r\n    `;\r\n\r\n    const H4 = styled.h4`${iconStyles}`;\r\n\r\n    const container = renderer.create(\r\n      <H4>\"a label\"</H4>\r\n    ).toJSON();\r\n    expect(container).toMatchStyledComponentsSnapshot();\r\n  });\r\n```\r\n\r\n"}}
{"actor":{"display_login":"Thr44"}}