jest-styled-components
Version:
Jest utilities for Styled Components
21 lines (17 loc) • 559 B
JavaScript
const toHaveStyleRule = require('./toHaveStyleRule');
const styleSheetSerializer = require('./styleSheetSerializer');
const { resetStyleSheet, enableCSSCache, disableCSSCache } = require('./utils');
if (typeof beforeEach === 'function') {
beforeEach(resetStyleSheet);
}
if (typeof expect !== 'undefined') {
expect.addSnapshotSerializer(styleSheetSerializer);
expect.extend({ toHaveStyleRule });
}
module.exports = {
styleSheetSerializer,
resetStyleSheet,
enableCSSCache,
disableCSSCache,
setStyleRuleOptions: toHaveStyleRule.setOptions,
};