components.widgets.Html.Html.test.js Maven / Gradle / Ivy
The newest version!
import React from 'react'
import { render } from 'enzyme'
import Html from './Html.jsx'
it('correct class in html', () => {
const wrapper = render(
name is {name} , surname id {surname}'}
/>,
)
expect(wrapper.find('.some')).toHaveLength(1)
expect(wrapper.text()).toBe('name is {name} , surname id {surname}')
})
it('correct string in html (with placeholders)', () => {
const wrapper = render(
,
)
expect(wrapper.text()).toBe('Tom : Sower')
})
it('right html with placeholders', () => {
const wrapper = render(
,
)
expect(wrapper.html()).toEqual('