next.js / packages /next /src /client /components /is-next-router-error.test.ts
AbdulElahGwaith's picture
Upload folder using huggingface_hub
b91e262 verified
import { isNextRouterError } from './is-next-router-error'
import { notFound } from './not-found'
describe('isNextRouterError', () => {
it('returns true for a navigation error', () => {
let caught
try {
notFound()
} catch (error) {
caught = error
}
expect(isNextRouterError(caught)).toBe(true)
})
})