Files
frontend-bootcamp/bonus-jest/demo/src/TestMe.spec.tsx
2019-03-04 11:36:08 -08:00

12 lines
394 B
TypeScript

import React from 'react';
import { mount } from 'enzyme';
import { TestMe } from './TestMe';
describe('TestMe Component', () => {
it('should have a non-clickable component when the original InnerMe is clicked', () => {
const wrapper = mount(<TestMe name="world" />);
wrapper.find('#innerMe').simulate('click');
expect(wrapper.find('#innerMe').text()).toBe('Clicked');
});
});