1

I have come across this error when attempting to run my test cases. I have tried the solution suggested here to no luck.

Here is my test code:

import React from 'react'
import { act, render } from '@testing-library/react'
import App from './App'

describe('Renders App Component', () => {
  let getByTestId
  beforeEach(() => {
    const component = render(<App />)
    getByTestId = component.getByTestId
  })

  it('Renders Header Caption', () => {
    const header = getByTestId('header-caption')

    expect(header.textContent).toBe('Data Dashboard')
  })
})

Here is the error that I'm seeing: enter image description here

0 Answers0