enzyme at example

Example: enzyme at example

// dom.js

import React from 'react'

const DomTest = () => (
  

hello wordl satu

hello wordl dua

hello wordl tiga

DOM Satu

DOM Dua

DOM Tiga

Hello World

) export default DomTest // dom.test.js test('find element in DomTest Component by index using at', () => { expect(wrapper.find('.domGroup').children().at(0).text()).toStrictEqual('DOM Satu') expect(wrapper.find('.domGroup').children().at(1).text()).toStrictEqual('DOM Dua') expect(wrapper.find('.domGroup').children().at(2).text()).toStrictEqual('DOM Tiga') })

Tags:

Misc Example