
* Fix attr name typo * Use proper string serialization * Use proper image URL * Remove unused draft component * Fix classname for invoice card * Update deps * Remove unused testcafe * Resolve issue with missing intl in one of the stories, bump intl package version * Update packages * Update commit hooks * Bump ts to last pre4.0 version * Center metadata image * Unused property * Bump enzyme * Revert * Fix logo on login screen * Fix console errors on entering translations pages * Fix styles for invoice card
25 lines
821 B
TypeScript
25 lines
821 B
TypeScript
import createGenerateClassName from "@material-ui/styles/createGenerateClassName";
|
|
import initStoryshots from "@storybook/addon-storyshots";
|
|
// tslint:disable no-submodule-imports
|
|
import { configure, render } from "enzyme";
|
|
import Adapter from "enzyme-adapter-react-16";
|
|
import toJSON from "enzyme-to-json";
|
|
import React from "react";
|
|
|
|
// Fixes useLayoutEffect warnings
|
|
React.useLayoutEffect = React.useEffect;
|
|
|
|
configure({ adapter: new Adapter() });
|
|
|
|
jest.mock("@material-ui/styles/createGenerateClassName");
|
|
(createGenerateClassName as any).mockImplementation(() => (rule, stylesheet) =>
|
|
[stylesheet.options.meta, rule.key, "id"].join("-")
|
|
);
|
|
|
|
initStoryshots({
|
|
configPath: "src/storybook/",
|
|
test({ story }) {
|
|
const result = render(story.render() as any);
|
|
expect(toJSON(result)).toMatchSnapshot();
|
|
}
|
|
});
|