See the Number of Todos To Be Completed
Story: As a user, I want to see how many remaining todos I have to complete.
Footer component
Should render correctly
It should be a Footer component
// tests/todomvc/components/Footer.spec.js
'use strict';
import React from 'react'
import {expect} from 'chai'
import {shallow} from 'enzyme'
import Footer from '../../../src/todomvc/components/Footer'
function setup() {
const component = shallow(
<Footer/>
);
return {
component: component
}
}
describe('Footer component', () => {
describe('Should render correctly', () => {
it('Should be a Footer', () => {
const {component} = setup();
expect(component.type()).to.equal('footer')
})
})
});It should have a todo counter
Should behave correctly
It should display 'No todos left' when active count is 0
It should display '1 todo left' when active count is 1
It should display '5 todos left' when active count is 5
MainSection component
Should render correctly
It should include a Footer component
Run It!



PreviousToggle All Todos Between Completed and Not CompletedNextFilter the Todos List Between Completed, Not Completed, and All
Last updated
Was this helpful?