react-openfin-mat-impl
Version:
Materialize UI implementation of react-openfin
28 lines • 1.17 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const React = require("react");
const enzyme_to_json_1 = require("enzyme-to-json");
const styles_1 = require("@material-ui/core/styles");
const styles_2 = require("@material-ui/styles");
const test_utils_1 = require("@material-ui/core/test-utils");
const MySnackbarContent_1 = require("./MySnackbarContent");
const muiTheme = styles_1.createMuiTheme({});
describe('MySnackbarContent comp', () => {
let shallow;
let mount;
beforeEach(() => {
shallow = test_utils_1.createShallow();
mount = test_utils_1.createMount();
});
afterEach(() => {
mount.cleanUp();
});
it('renders correctly by default', () => {
const onClose = jest.fn();
const wrapper = shallow(React.createElement(styles_2.ThemeProvider, { theme: muiTheme },
React.createElement(MySnackbarContent_1.default, { message: 'message', onClose: onClose, variant: 'primary' })));
// const component = wrapper.dive();
expect(enzyme_to_json_1.default(wrapper)).toMatchSnapshot();
});
});
//# sourceMappingURL=MySnackbarContent.spec.js.map