-
Notifications
You must be signed in to change notification settings - Fork 430
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test(releases): comprehensive testing on release nav (#7840)
- Loading branch information
Showing
9 changed files
with
290 additions
and
80 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
packages/sanity/src/core/releases/hooks/__tests__/__mocks__/usePerspective.mock.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import {type Mocked, vi} from 'vitest' | ||
|
||
import {LATEST} from '../../../util/const' | ||
import {type PerspectiveValue} from '../../usePerspective' | ||
|
||
export const usePerspectiveMock: Mocked<PerspectiveValue> = { | ||
perspective: undefined, | ||
excludedPerspectives: [], | ||
setPerspective: vi.fn(), | ||
currentGlobalBundle: LATEST, | ||
setPerspectiveFromReleaseId: vi.fn(), | ||
setPerspectiveFromReleaseDocumentId: vi.fn(), | ||
toggleExcludedPerspective: vi.fn(), | ||
isPerspectiveExcluded: vi.fn(), | ||
currentGlobalBundleId: 'drafts', | ||
bundlesPerspective: [], | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.