Skip to content

Commit

Permalink
move console mock
Browse files Browse the repository at this point in the history
  • Loading branch information
ajay-sentry committed May 10, 2024
1 parent 0bef9c9 commit 694d902
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/services/repo/useRepoConfig.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,6 @@ afterAll(() => {
server.close()
})

// silence console errors
console.error = () => {}

interface SetupArgs {
isNotFoundError?: boolean
isOwnerNotActivatedError?: boolean
Expand Down Expand Up @@ -144,6 +141,12 @@ describe('useRepoConfig', () => {
})

describe('hook errors', () => {
beforeAll(() => {
console.error = () => {}
})
afterAll(() => {
jest.resetAllMocks()
})
it('can return unsuccessful parse error', async () => {
setup({ isUnsuccessfulParseError: true })

Expand Down

0 comments on commit 694d902

Please sign in to comment.