Last active
June 7, 2022 21:45
-
-
Save Keraito/54b88d72fdf82960dfc1bf07aaefcdfa to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { mount } from "enzyme"; | |
import { SomeComponent, SomeComponentProps } from "./someComponent"; | |
function mountComponent(props: Partial<SomeComponentProps>): ReactWrapper { | |
return mount( | |
<SomeComponent variant="normal" title="Test Title" {...props} /> | |
); | |
} | |
describe("SomeComponent", () => { | |
test("works like it should", () => { | |
const onChangeMock = jest.fn(); | |
const component = mountComponent({ onChange: onChangeMock }); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment