oblador / react-native-collapsible

Animated collapsible component for React Native, good for accordions, toggles etc
MIT License
2.42k stars 455 forks source link

Jest test failures in React Native 0.72 #468

Open jkepps opened 1 year ago

jkepps commented 1 year ago

After migrating to react native 0.72, a simple jest test with react testing library gives the following error about a hundred times and the test fails: ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/index.test.tsx.

Here is the component and its test:

// src/components/form/CollapsibleFormField/TestComponent.tsx
import { useState } from 'react'
import { Text } from 'react-native'
import Collapsible from 'react-native-collapsible'

export const TestComponent = () => {
  const [visible, setVisible] = useState(false)

  return (
    <>
      <Text onPress={() => setVisible(current => !current)}>Press me</Text>
      <Collapsible collapsed={!visible}>
        <Text>Hello</Text>
      </Collapsible>
    </>
  )
}
// src/components/form/CollapsibleFormField/TestComponent.test.tsx
import { fireEvent, render, screen } from '@testing-library/react-native'

import { TestComponent } from './TestComponent'

describe('test', () => {
  it('test', () => {
    render(<TestComponent />)
    fireEvent.press(screen.getByText('Press me'))
    fireEvent.press(screen.getByText('Press me'))
    expect(screen.getByText('Hello')).toBeVisible()
  })
})

here is the test output:

yarn test src/components/form/CollapsibleFormField/TestComponent.test.tsx
yarn run v1.22.19
$ TZ=UTC jest --colors src/components/form/CollapsibleFormField/TestComponent.test.tsx

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)
 PASS  src/components/form/CollapsibleFormField/TestComponent.test.tsx
  test
    ✓ test (32 ms)

Test Suites: 1 passed, 1 total
Tests:       1 passed, 1 total
Snapshots:   0 total
Time:        1.854 s, estimated 2 s
Ran all test suites matching /src\/components\/form\/CollapsibleFormField\/TestComponent.test.tsx/i.

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)

ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From src/components/form/CollapsibleFormField/TestComponent.test.tsx.

      at Timeout._onTimeout (node_modules/react-native/jest/setup.js:414:26)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
michtntbrighte commented 11 months ago

@jkepps did you find the solution? had same issue

michtntbrighte commented 11 months ago

I fixed it by adding jest.useFakeTimers(), on beforeEach block in the affected test files

JadeMing commented 7 months ago

I fixed it by adding jest.useFakeTimers(), on beforeEach block in the affected test files

How about if must use the real timer in some test cases?

gimi-anders commented 6 months ago

I am also having this issue, and I cannot use fake timers.

bfwalton commented 4 months ago

I encountered a similar issue with the same error, for some reason the CLI had the NODE_ENV set to "development". Unsetting the NODE_ENV resolved the issue.