mirror of
https://github.com/nowcommunity/nowdatabase.git
synced 2026-10-12 19:13:52 +03:00
Fix code review issues: add missing afterEach import and simplify error handling
Co-authored-by: karilint <19990676+karilint@users.noreply.github.com>
This commit is contained in:
co-authored by
karilint
parent
d29a1dc8fb
commit
f55be9c6fc
@@ -79,7 +79,7 @@ export const ReferenceDetails = () => {
|
||||
try {
|
||||
await deleteMutation(parseInt(id!)).unwrap()
|
||||
} catch (error) {
|
||||
const message = resolveDeleteErrorMessage(error ?? deleteError)
|
||||
const message = resolveDeleteErrorMessage(error)
|
||||
notify(message, 'error')
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { beforeEach, describe, expect, it, jest } from '@jest/globals'
|
||||
import { afterEach, beforeEach, describe, expect, it, jest } from '@jest/globals'
|
||||
import { render, screen, waitFor } from '@testing-library/react'
|
||||
import userEvent from '@testing-library/user-event'
|
||||
import { MemoryRouter, Route, Routes } from 'react-router-dom'
|
||||
|
||||
Reference in New Issue
Block a user