[COMPASS-5240] Call @testing-library/react's cleanup() in a global mocha afterEach loop Created: 01/Nov/21  Updated: 28/Jun/23  Resolved: 23/Mar/23

Status: Closed
Project: Compass
Component/s: Tech debt, Testing
Affects Version/s: None
Fix Version/s: No version

Type: Task Priority: Major - P3
Reporter: Le Roux Bodenstein Assignee: Unassigned
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Documentation Changes: Not Needed

 Description   

See https://github.com/mongodb-js/compass/pull/2554#discussion_r740182035

 

Tried to do the obvious, but couldn't get it to work so now we need

 

 

 

afterEach(() => {
  cleanup();
});

 

 

everywhere we use react testing library if we want test-watch to work.


Generated at Wed Feb 07 22:38:55 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.