score:0

test('NavLinks paths 1', () => {
    nav = wrapper.find('nav');
    NavLink = wrapper.find('NavLink')
    expect(wrapper.find('NavLink')).toHaveLength(4)
    const firstNavLink = wrapper.find('NavLink').first();
    expect(firstNavLink.prop('to')).toEqual('/calories');
})

test('NavLinks paths 2', () => {
    nav = wrapper.find('nav');
    NavLink = wrapper.find('NavLink')
    expect(wrapper.find('NavLink')).toHaveLength(4)
    const secondNavLink = wrapper.find('NavLink').at(1)
    expect(secondNavLink.prop('to')).toEqual('/details');
})

test('NavLinks paths 3', () => {
    nav = wrapper.find('nav');
    NavLink = wrapper.find('NavLink')
    expect(wrapper.find('NavLink')).toHaveLength(4)
    const thirdNavLink = wrapper.find('NavLink').at(2)
    expect(thirdNavLink.prop('to')).toEqual('/progress');
    
})

test('NavLinks paths 4', () => {
    nav = wrapper.find('nav');
    NavLink = wrapper.find('NavLink')
    expect(wrapper.find('NavLink')).toHaveLength(4)
    const fourthNavLink = wrapper.find('NavLink').at(3)
    expect(fourthNavLink.prop('to')).toEqual('/recipe');
})

Related Query

More Query from same tag