-
-
Save Mindaugas-Jacionis/21e9d8638254887befbd31ddbcee80a6 to your computer and use it in GitHub Desktop.
Tests
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 React from 'react'; | |
import { Button } from '../components/ui'; | |
import { shallow, mount, render } from 'enzyme'; | |
/* Testing props of components */ | |
describe('Input component prop tests', () => { | |
it('should render a document title', done => { | |
const wrapper = shallow( | |
<Button text={'Test'} type={'submit'} /> | |
); | |
expect(wrapper.props().type).toEqual('submit'); // passes | |
expect(wrapper.props().text).toEqual('Test'); // does not pass | |
done(); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment