mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2026-03-13 19:13:46 +00:00
Update tests to use vi instead of jest
This commit is contained in:
@@ -14,8 +14,8 @@ describe('<DeleteShortUrlModal />', () => {
|
||||
shortCode: 'abc123',
|
||||
longUrl: 'https://long-domain.com/foo/bar',
|
||||
});
|
||||
const deleteShortUrl = jest.fn().mockResolvedValue(undefined);
|
||||
const shortUrlDeleted = jest.fn();
|
||||
const deleteShortUrl = vi.fn().mockResolvedValue(undefined);
|
||||
const shortUrlDeleted = vi.fn();
|
||||
const setUp = (shortUrlDeletion: Partial<ShortUrlDeletion>) => renderWithEvents(
|
||||
<TestModalWrapper
|
||||
renderModal={(args) => (
|
||||
@@ -25,13 +25,13 @@ describe('<DeleteShortUrlModal />', () => {
|
||||
shortUrlDeletion={fromPartial(shortUrlDeletion)}
|
||||
deleteShortUrl={deleteShortUrl}
|
||||
shortUrlDeleted={shortUrlDeleted}
|
||||
resetDeleteShortUrl={jest.fn()}
|
||||
resetDeleteShortUrl={vi.fn()}
|
||||
/>
|
||||
)}
|
||||
/>,
|
||||
);
|
||||
|
||||
afterEach(jest.clearAllMocks);
|
||||
afterEach(vi.clearAllMocks);
|
||||
|
||||
it('shows generic error when non-threshold error occurs', () => {
|
||||
setUp({
|
||||
|
||||
Reference in New Issue
Block a user