Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
katspaugh committed Aug 31, 2023
1 parent 2f41b7b commit 9b6624f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/tests/pages/apps.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import React from 'react'
import * as safeAppsGatewaySDK from '@safe-global/safe-gateway-typescript-sdk'
import { SafeAppFeatures } from '@safe-global/safe-gateway-typescript-sdk'
import type { SafeAppData } from '@safe-global/safe-gateway-typescript-sdk'
import { useParams } from 'next/navigation'

Check failure on line 5 in src/tests/pages/apps.test.tsx

View workflow job for this annotation

GitHub Actions / ESLint Results

unused-imports/no-unused-imports-ts

'useParams' is defined but never used.

import {
render,
Expand All @@ -25,6 +26,11 @@ jest.mock('@safe-global/safe-gateway-typescript-sdk', () => ({
getSafeApps: (chainId: string) => Promise.resolve(mockedSafeApps),
}))

jest.mock('next/navigation', () => ({
...jest.requireActual('next/navigation'),
useParams: jest.fn(() => ({ safe: 'matic:0x0000000000000000000000000000000000000000' })),
}))

describe('AppsPage', () => {
beforeEach(() => {
jest.restoreAllMocks()
Expand Down

0 comments on commit 9b6624f

Please sign in to comment.