From 47008f39a64be8c46bd9a2982fca1d4e6f806675 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Mon, 2 Oct 2023 14:35:15 -0500 Subject: [PATCH] toast: fix toast test (use ESM imports) --- src/toast.test.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/toast.test.tsx b/src/toast.test.tsx index 2135c461c..49f27850a 100644 --- a/src/toast.test.tsx +++ b/src/toast.test.tsx @@ -1,14 +1,14 @@ import { render } from '@testing-library/react'; import { AxiosError, AxiosHeaders } from 'axios'; import React from 'react'; +import { Toaster } from 'react-hot-toast'; import { IntlProvider } from 'react-intl'; import { act, screen } from 'soapbox/jest/test-helpers'; -function renderApp() { - const { Toaster } = require('react-hot-toast'); - const toast = require('./toast').default; +import toast from './toast'; +function renderApp() { return { toast, ...render(