{"push_id":1162380862,"size":1,"distinct_size":1,"ref":"refs/heads/jlfwong-test-utils","head":"b01280d73254954f6703cb49c00e83c30b65b349","before":"b56734e944e66f98bfb71cfdde47bb4342fef5d4","commits":[{"sha":"b01280d73254954f6703cb49c00e83c30b65b349","author":{"name":"Jamie Wong","email":"44dae13f482d82919ef115c577b3e06648db00ef@gmail.com"},"message":"Introduce StyleSheetTestUtils to make writing tests for Aphrodite easier\n\nImagine you're trying to introduce Aphrodite gradually into an existing codebase\nthat already has extensive test coverage for rendering components.\n\nIf those tests are run in node without any fake DOM being constructed, your\npreviously working tests will now fail with the following error:\n\n     Error: Cannot automatically buffer without a document\n\nThe introduction of StyleSheetTestUtils makes it easy to suppress such problems\nby preventing Aphrodite from trying to interact with the DOM at all.\n\nThe new API would be usable in your tests like so (using Mocha syntax for\ndemonstration purposes):\n\n    import { StyleSheetTestUtils } from 'aphrodite';\n\n    beforeEach(() => {\n        StyleSheetTestUtils.suppressStyleInjection();\n    });\n\n    afterEach(() => {\n        StyleSheetTestUtils.clearBufferAndResumeStyleInjection();\n    });\n\nI intentionally did not expose an API returning CSS content here to allow us\nflexibility to change the CSS formatting or class name generation without\nconsidering it a breaking API change.\n\nMeant to solve the problem presented in #41","distinct":true,"url":"https://api.github.com/repos/Khan/aphrodite/commits/b01280d73254954f6703cb49c00e83c30b65b349"}]}
{"actor":{"display_login":"jlfwong"}}