toast: fix toast test (use ESM imports)

This commit is contained in:
Alex Gleason 2023-10-02 14:35:15 -05:00
parent 3f640e9797
commit 47008f39a6
No known key found for this signature in database
GPG key ID: 7211D1F99744FBB7

View file

@ -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(