You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I get the open handle warning with Jest 28. Jest 27 doesn't have the same problem.
Test:
import { render } from '@testing-library/react-native'
import React from 'react'
import { Text } from 'react-native'
describe('a test', () => {
it('can run a test', () => {
const { getByText } = render(<Text>Hello</Text>)
expect(getByText('Hello')).toBeDefined()
})
})
Test output:
PASS services/meow.spec.tsx
weird test
✓ can run a test (19 ms)
--------------|---------|----------|---------|---------|-------------------
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
--------------|---------|----------|---------|---------|-------------------
All files | 0 | 100 | 100 | 0 |
.eslintrc.js | 0 | 100 | 100 | 0 | 1
--------------|---------|----------|---------|---------|-------------------
Test Suites: 1 passed, 1 total
Tests: 1 passed, 1 total
Snapshots: 0 total
Time: 1.901 s, estimated 4 s
Ran all test suites matching /services\/meow.spec.ts/i.
Jest has detected the following 1 open handle potentially keeping Jest from exiting:
● MESSAGEPORT
> 1 | import { render } from '@testing-library/react-native'
| ^
2 | import React from 'react'
3 | import { Text } from 'react-native'
4 |
at node_modules/scheduler/cjs/scheduler.development.js:178:17
at Object.<anonymous> (node_modules/scheduler/cjs/scheduler.development.js:645:5)
at Object.<anonymous> (node_modules/scheduler/index.js:6:20)
at node_modules/react-test-renderer/cjs/react-test-renderer.development.js:19:19
at Object.<anonymous> (node_modules/react-test-renderer/cjs/react-test-renderer.development.js:17382:5)
at Object.<anonymous> (node_modules/react-test-renderer/index.js:6:20)
at Object.<anonymous> (node_modules/@testing-library/react-native/src/act.ts:1:1)
at Object.<anonymous> (node_modules/@testing-library/react-native/src/pure.ts:1:1)
at Object.<anonymous> (node_modules/@testing-library/react-native/src/index.ts:1:1)
at Object.<anonymous> (services/meow.spec.tsx:1:1)
Dependencies (at least the ones that matter, I hope):
I get the open handle warning with Jest 28. Jest 27 doesn't have the same problem.
Test:
Test output:
Dependencies (at least the ones that matter, I hope):
We're using the
jest-expo
prese, however, not the React Native one (directly, anyways).Originally posted by @duraz0rz in #1007 (comment)
The text was updated successfully, but these errors were encountered: