diff --git a/src/plugins/artifact/editor/App.test.js b/src/plugins/artifact/editor/App.test.js index eca202e..65e4568 100644 --- a/src/plugins/artifact/editor/App.test.js +++ b/src/plugins/artifact/editor/App.test.js @@ -2,15 +2,7 @@ import React from "react"; import ReactDOM from "react-dom"; import App from "./App"; -import {StyleSheetTestUtils} from "aphrodite/no-important"; - -beforeEach(() => { - StyleSheetTestUtils.suppressStyleInjection(); -}); - -afterEach(() => { - StyleSheetTestUtils.clearBufferAndResumeStyleInjection(); -}); +require("./testUtil").configureAphrodite(); // Check that PropTypes check out. it("renders without crashing", () => { diff --git a/src/plugins/artifact/editor/testUtil.js b/src/plugins/artifact/editor/testUtil.js new file mode 100644 index 0000000..4668105 --- /dev/null +++ b/src/plugins/artifact/editor/testUtil.js @@ -0,0 +1,11 @@ +import {StyleSheetTestUtils} from "aphrodite/no-important"; + +export function configureAphrodite() { + beforeEach(() => { + StyleSheetTestUtils.suppressStyleInjection(); + }); + + afterEach(() => { + StyleSheetTestUtils.clearBufferAndResumeStyleInjection(); + }); +}