sourcegraph/client/shared/dev/reactCleanup.ts
Jason Bedard 10aefc4bb7
bazel: add bazel build,tests for client/* (#46193)
Webpack bundles compile but need further testing. Jest + mocha tests
compile but are marked as `manual` until further work is done to get them
passing. The four jest tests are green and enabled now, though.

## Test plan

`bazel build //client/...` and `bazel test //client/...`
2023-02-28 20:46:03 -08:00

11 lines
329 B
TypeScript

import { cleanup } from '@testing-library/react'
/**
* Prevents an issue similar to the one reported here:
* https://github.com/vitest-dev/vitest/issues/1430
*
* Normally `cleanup` should be called automatically after each test.
* https://testing-library.com/docs/svelte-testing-library/api/#cleanup
*/
afterEach(cleanup)