-
Notifications
You must be signed in to change notification settings - Fork 14
please export StyleSheetTestUtils #72
Copy link
Copy link
Open
Description
Hi!
First of all thanks for making this interface!
Is it possible to export the following test-utility function from aphrodite:
StyleSheetTestUtils
This would remove the need to add the complete aphrodite dependency to a project while only actually using react-with-styles-interface-aphrodite, just for testing purposes.
I'm currently only using this interface for the react-dates dateRangePicker component but the tests are currently throwing this error:
styleTag = document.querySelector("style[data-aphrodite]")
^
TypeError: Cannot read property 'querySelector' of nullThis issue can be solved by adding the following for each test:
beforeEach(() => {
StyleSheetTestUtils.suppressStyleInjection();
});
afterEach(() => {
StyleSheetTestUtils.clearBufferAndResumeStyleInjection();
});Since the StyleSheetTestUtils are not exported by react-with-styles-interface-aphrodite I'll need to install the complete aphrodite package just for testing, which feels like an overkill.
I'll prepare an PR for this.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels