Skip to content

Commit

Permalink
refactor: Rename helper to useShouldShowDefaultRedirectionSnackbar
Browse files Browse the repository at this point in the history
  • Loading branch information
Ldoppea committed Sep 24, 2024
1 parent cafd347 commit fa234a1
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import LightbulbIcon from 'cozy-ui/transpiled/react/Icons/Lightbulb'
import {
HOME_DEFAULT_REDIRECTION,
useShouldShowDefaultRedirectionSnackbar
} from './helpers'
} from './useShouldShowDefaultRedirectionSnackbar'
import useIncrementDefaultRedirectionViewCount from './useIncrementDefaultRedirectionViewCount'
import { isFlagshipApp } from 'cozy-device-helper'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ import CozyTheme from 'cozy-ui/transpiled/react/providers/CozyTheme'

import AppLike from 'test/AppLike'
import DefaultRedirectionSnackbar from './DefaultRedirectionSnackbar'
import { useShouldShowDefaultRedirectionSnackbar } from './helpers'
import { useShouldShowDefaultRedirectionSnackbar } from './useShouldShowDefaultRedirectionSnackbar'

jest.mock('cozy-client', () => ({
...jest.requireActual('cozy-client'),
useQuery: jest.fn(),
useClient: jest.fn(),
useSettings: jest.fn()
}))
jest.mock('./helpers')
jest.mock('./useShouldShowDefaultRedirectionSnackbar')
jest.mock('./useIncrementDefaultRedirectionViewCount')

const setup = () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
hasQueryBeenLoaded
} from 'cozy-client'

import { VIEW_COUNT_THRESHOLD } from './helpers'
import { VIEW_COUNT_THRESHOLD } from './useShouldShowDefaultRedirectionSnackbar'
import useHomeAppOpened from './useHomeAppOpened'

const useIncrementDefaultRedirectionViewCount = () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import useIncrementDefaultRedirectionViewCount from './useIncrementDefaultRedire
import useHomeAppOpened from './useHomeAppOpened'

jest.mock('cozy-client')
jest.mock('./helpers')
jest.mock('./useShouldShowDefaultRedirectionSnackbar')
jest.mock('./useHomeAppOpened')

describe('useIncrementDefaultRedirectionViewCount', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
useSettings
} from 'cozy-client'

import { useShouldShowDefaultRedirectionSnackbar } from './helpers'
import { useShouldShowDefaultRedirectionSnackbar } from './useShouldShowDefaultRedirectionSnackbar'

jest.mock('cozy-client')

Expand Down

0 comments on commit fa234a1

Please sign in to comment.