Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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");
// @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');
beforeAll(() => {
StyleSheetTestUtils.suppressStyleInjection();
});
beforeAll(() => {
StyleSheetTestUtils.suppressStyleInjection();
});
;
}
}
const output = StyleSheetServer.renderStatic(() => {
return "test";
});
output.css.content;
output.css.renderedClassNames;
output.html;
StyleSheet.rehydrate(output.css.renderedClassNames);
StyleSheetTestUtils.suppressStyleInjection();
StyleSheetTestUtils.clearBufferAndResumeStyleInjection();
beforeAll(() => {
StyleSheetTestUtils.suppressStyleInjection();
});
beforeAll(() => {
StyleSheetTestUtils.suppressStyleInjection();
});
beforeAll(() => {
StyleSheetTestUtils.suppressStyleInjection();
});
beforeAll(() => {
StyleSheetTestUtils.suppressStyleInjection();
});
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');