Skip to content

Instantly share code, notes, and snippets.

@whtswrng
Created September 25, 2018 08:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save whtswrng/76d6f6eedb42322140c227702ffd1374 to your computer and use it in GitHub Desktop.
Save whtswrng/76d6f6eedb42322140c227702ffd1374 to your computer and use it in GitHub Desktop.
react-testing-5.js
it('should render marketing content with correct logo', () => {
expect(wrapper.find('MarketingContent').length).toBe(1);
expect(wrapper.find('MarketingContent').props("logo")).toEqual(logo);
});
it('should render email input and pass it onChange method', () => {
expect(wrapper.find('EmailInput').length).toBe(1);
expect(wrapper.find('EmailInput').props("onChange")).toEqual(this.onChange);
});
it('should render submit button', () => {
expect(wrapper.find('SubmitInput').length).toBe(1);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment