{"action":"created","issue":{"url":"https://api.github.com/repos/suchipi/chai-jest-snapshot/issues/23","repository_url":"https://api.github.com/repos/suchipi/chai-jest-snapshot","labels_url":"https://api.github.com/repos/suchipi/chai-jest-snapshot/issues/23/labels{/name}","comments_url":"https://api.github.com/repos/suchipi/chai-jest-snapshot/issues/23/comments","events_url":"https://api.github.com/repos/suchipi/chai-jest-snapshot/issues/23/events","html_url":"https://github.com/suchipi/chai-jest-snapshot/pull/23","id":241657125,"number":23,"title":"Seamless usage when running within Jest","user":{"login":"tdd","id":3752,"avatar_url":"https://avatars7.githubusercontent.com/u/3752?v=4","gravatar_id":"","url":"https://api.github.com/users/tdd","html_url":"https://github.com/tdd","followers_url":"https://api.github.com/users/tdd/followers","following_url":"https://api.github.com/users/tdd/following{/other_user}","gists_url":"https://api.github.com/users/tdd/gists{/gist_id}","starred_url":"https://api.github.com/users/tdd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tdd/subscriptions","organizations_url":"https://api.github.com/users/tdd/orgs","repos_url":"https://api.github.com/users/tdd/repos","events_url":"https://api.github.com/users/tdd/events{/privacy}","received_events_url":"https://api.github.com/users/tdd/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2017-07-10T09:47:15Z","updated_at":"2017-07-14T07:18:42Z","closed_at":"2017-07-14T07:15:17Z","pull_request":{"url":"https://api.github.com/repos/suchipi/chai-jest-snapshot/pulls/23","html_url":"https://github.com/suchipi/chai-jest-snapshot/pull/23","diff_url":"https://github.com/suchipi/chai-jest-snapshot/pull/23.diff","patch_url":"https://github.com/suchipi/chai-jest-snapshot/pull/23.patch"},"body":"Hi all!\r\n\r\nThanks a ton for this module, it's super cool.\r\n\r\nHowever, its existing behavior entirely focuses on people using snapshots *outside of Jest*, but a significant share of users *still use Jest*: they just favor Chai's assertion syntax and plugin ecosystem.\r\n\r\nI do a lot of JS training, and this is what most of my trainees tell me. That's my situation, too.\r\n\r\nThis PR makes it so that, when running in Jest, we just delegate to Jest's built-in snapshot capability. No configuration, no setup cost, just registering the Chai plugin, like any other. *As seamless as can be.*\r\n\r\nTests, examples and docs are updated. I strived to follow the coding style I inferred from the source (even if I'm more of StandardJS fan myself 😉 ).\r\n\r\nI hope you like it! Feel free to push back if you have any questions or want tweaks.\r\n\r\nThis addresses the one reason why I don't use this module in my trainings yet.\r\n\r\nFWIW, I'm considering making it even nicer by automatically detecting Enzyme wrappers and then using `enzyme-to-json` to streamline the testing experience even more. This could be done for all modes, too, and be a nice one-up over Jest's built-in snapshotting. I'd love feedback on the idea.\r\n\r\nBest,"},"comment":{"url":"https://api.github.com/repos/suchipi/chai-jest-snapshot/issues/comments/315289789","html_url":"https://github.com/suchipi/chai-jest-snapshot/pull/23#issuecomment-315289789","issue_url":"https://api.github.com/repos/suchipi/chai-jest-snapshot/issues/23","id":315289789,"user":{"login":"suchipi","id":1341513,"avatar_url":"https://avatars4.githubusercontent.com/u/1341513?v=4","gravatar_id":"","url":"https://api.github.com/users/suchipi","html_url":"https://github.com/suchipi","followers_url":"https://api.github.com/users/suchipi/followers","following_url":"https://api.github.com/users/suchipi/following{/other_user}","gists_url":"https://api.github.com/users/suchipi/gists{/gist_id}","starred_url":"https://api.github.com/users/suchipi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/suchipi/subscriptions","organizations_url":"https://api.github.com/users/suchipi/orgs","repos_url":"https://api.github.com/users/suchipi/repos","events_url":"https://api.github.com/users/suchipi/events{/privacy}","received_events_url":"https://api.github.com/users/suchipi/received_events","type":"User","site_admin":false},"created_at":"2017-07-14T07:18:42Z","updated_at":"2017-07-14T07:18:42Z","body":"This has been published in v1.3.0. Thank you for the contribution! 🎉"}}
{"actor":{"display_login":"suchipi"}}