(
props: Partial<SettingsContextData> = {},
)
| 3 | import { SortCommentsBy } from '../../src/graphql/comments'; |
| 4 | |
| 5 | export const createTestSettings = ( |
| 6 | props: Partial<SettingsContextData> = {}, |
| 7 | ): SettingsContextData => ({ |
| 8 | spaciness: 'eco', |
| 9 | openNewTab: true, |
| 10 | setTheme: jest.fn(), |
| 11 | themeMode: ThemeMode.Dark, |
| 12 | setSpaciness: jest.fn(), |
| 13 | toggleOpenNewTab: jest.fn(), |
| 14 | insaneMode: false, |
| 15 | loadedSettings: true, |
| 16 | toggleInsaneMode: jest.fn(), |
| 17 | showTopSites: true, |
| 18 | toggleShowTopSites: jest.fn(), |
| 19 | autoDismissNotifications: true, |
| 20 | optOutCompanion: true, |
| 21 | optOutReadingStreak: true, |
| 22 | optOutLevelSystem: false, |
| 23 | optOutQuestSystem: false, |
| 24 | sidebarExpanded: true, |
| 25 | companionExpanded: true, |
| 26 | sortingEnabled: true, |
| 27 | sortCommentsBy: SortCommentsBy.OldestFirst, |
| 28 | showFeedbackButton: true, |
| 29 | toggleShowFeedbackButton: jest.fn(), |
| 30 | toggleAutoDismissNotifications: jest.fn(), |
| 31 | toggleOptOutCompanion: jest.fn(), |
| 32 | toggleOptOutReadingStreak: jest.fn(), |
| 33 | toggleOptOutLevelSystem: jest.fn(), |
| 34 | toggleOptOutQuestSystem: jest.fn(), |
| 35 | toggleSidebarExpanded: jest.fn(), |
| 36 | toggleSortingEnabled: jest.fn(), |
| 37 | syncSettings: jest.fn(), |
| 38 | updateCustomLinks: jest.fn(), |
| 39 | updateSortCommentsBy: jest.fn(), |
| 40 | updateFlag: jest.fn(), |
| 41 | updateFlagRemote: jest.fn(), |
| 42 | updatePromptFlag: jest.fn(), |
| 43 | onToggleHeaderPlacement: jest.fn(), |
| 44 | setSettings: jest.fn(), |
| 45 | applyThemeMode: jest.fn(), |
| 46 | ...props, |
| 47 | }); |
| 48 | |
| 49 | export const defaultTestSettings: SettingsContextData = createTestSettings(); |
| 50 |
no outgoing calls
no test coverage detected