Test RoomHeaderInfo

This commit is contained in:
Robin
2024-09-05 16:23:44 -04:00
parent 40fc1aa46b
commit d9333d6829
5 changed files with 78 additions and 23 deletions

View File

@@ -13,13 +13,14 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
import "global-jsdom/register";
import globalJsdom from "global-jsdom";
import i18n from "i18next";
import posthog from "posthog-js";
import { initReactI18next } from "react-i18next";
import { afterEach, beforeEach } from "vitest";
import { afterEach } from "vitest";
import { cleanup } from "@testing-library/react";
import "vitest-axe/extend-expect";
import { Config } from "./config/Config";
@@ -35,12 +36,4 @@ i18n.use(initReactI18next).init({
Config.initDefault();
posthog.opt_out_capturing();
// We need to cleanup the global jsDom
// Otherwise we will run into issues with async input test overlapping and throwing.
let cleanupJsDom: { (): void };
beforeEach(() => (cleanupJsDom = globalJsdom()));
afterEach(() => {
cleanupJsDom();
cleanup();
});
afterEach(cleanup);