How to use the aphrodite.StyleSheetTestUtils.suppressStyleInjection function in aphrodite

To help you get started, we’ve selected a few aphrodite examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Khan / wonder-blocks / config / jest / test-setup.js View on Github external
const {StyleSheetTestUtils} = require("aphrodite");
const Enzyme = require("enzyme");
const EnzymeAdapter = require("enzyme-adapter-react-16");

jest.spyOn(console, "error").mockImplementation((msg) => {
    throw new Error(`Unexpected call to console.error: ${msg}`);
});

StyleSheetTestUtils.suppressStyleInjection();

// Setup enzyme's react adapter
Enzyme.configure({adapter: new EnzymeAdapter()});

require("../../node_modules/jest-enzyme/lib/index.js");
github tesseralis / polyhedra-viewer / src / setupTests.js View on Github external
// @flow
import { configure } from 'enzyme';
import Adapter from 'enzyme-adapter-react-16';
import { StyleSheetTestUtils } from 'aphrodite';

configure({ adapter: new Adapter() });
StyleSheetTestUtils.suppressStyleInjection();

jest.mock('x3dom.js');
github simonsmith / github-user-search / test / components / Avatar.spec.js View on Github external
beforeAll(() => {
    StyleSheetTestUtils.suppressStyleInjection();
  });
github simonsmith / github-user-search / test / screens / Default.spec.js View on Github external
beforeAll(() => {
    StyleSheetTestUtils.suppressStyleInjection();
  });
github DefinitelyTyped / DefinitelyTyped / aphrodite / aphrodite-tests.tsx View on Github external
;
    }
}

const output = StyleSheetServer.renderStatic(() => {
    return "test";
});

output.css.content;
output.css.renderedClassNames;
output.html;

StyleSheet.rehydrate(output.css.renderedClassNames);

StyleSheetTestUtils.suppressStyleInjection();
StyleSheetTestUtils.clearBufferAndResumeStyleInjection();
github simonsmith / github-user-search / test / containers / RateLimitContainer.spec.js View on Github external
beforeAll(() => {
    StyleSheetTestUtils.suppressStyleInjection();
  });
github simonsmith / github-user-search / test / components / ItemList.spec.js View on Github external
beforeAll(() => {
    StyleSheetTestUtils.suppressStyleInjection();
  });
github simonsmith / github-user-search / test / components / Logo.spec.js View on Github external
beforeAll(() => {
    StyleSheetTestUtils.suppressStyleInjection();
  });
github simonsmith / github-user-search / test / components / Result.spec.js View on Github external
beforeAll(() => {
    StyleSheetTestUtils.suppressStyleInjection();
  });
github tesseralis / polyhedra-viewer / src / setupTests.ts View on Github external
import { configure } from 'enzyme';
import Adapter from 'enzyme-adapter-react-16';
import { StyleSheetTestUtils } from 'aphrodite';

configure({ adapter: new Adapter() });
StyleSheetTestUtils.suppressStyleInjection();

jest.mock('x3domWrapper.ts');