mars-v2-frontend/__tests__/Footer.test.tsx

17 lines
417 B
TypeScript
Raw Normal View History

2023-05-29 08:20:08 +00:00
import { shallow } from 'enzyme'
import Footer from 'components/Footer'
2023-05-29 08:20:08 +00:00
import Text from 'components/Text'
import packageJSON from '../package.json'
describe('<Footer />', () => {
it('should render correctly', () => {
2023-05-29 08:20:08 +00:00
const wrapper = shallow(<Footer />)
const textComponent = wrapper.find(Text).at(0)
const text = textComponent.dive().text()
2023-05-29 08:20:08 +00:00
expect(text).toBe(`v${packageJSON.version}`)
})
})