You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

16 lines
324 B

5 years ago
import { mount } from 'enzyme';
import TestDemo from '../src/component/TestDemo';
const sum = function (a, b) {
return a + b;
};
test('adds 1 + 2 to equal 3', () => {
expect(sum(1, 2)).toBe(3);
});
test('TestDemo', () => {
const wrapper = mount(<TestDemo />);
expect(wrapper.find('div').text()).toBe('test');
});