View a List of Todos
Story: As a user, I want to see all of todos in my todos list
TodoItem component
Should render correctly
It should be an li
// tests/todomvc/components/TodoItem.spec.js
'use strict';
import React from 'react'
import {expect} from 'chai'
import {shallow} from 'enzyme'
import TodoItem from '../../../src/todomvc/components/TodoItem'
function setup() {
const component = shallow(
<TodoItem/>
);
return {
component: component
}
}
describe('TodoItem component', () => {
describe('Should render correctly', () => {
it('Should be an li', () => {
const {component} = setup();
expect(component.type()).to.equal('li')
})
})
});It should have a label
MainSection component
Should render correctly
It should be a MainSection component
It should include a list of todos
TodoApp Component
It should render correctly
It should have a MainSection
Run It!

Last updated
Was this helpful?