/
githubmirror
/
client
Обзор
Документация
Войти
/
githubmirror
/
client
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
shared/stores/tests/push.desktop.test.ts
28 строк
746 B
chrisnojima
build(mobile): harden gobuild.sh and go bind pipeline 2 (#29364)
08 июл 2026, 15:25
Не верифицирован
08 июл 2026, 15:25
19b55b3
Код
Авторство
О чём код?
/// <reference types="jest" /> import {resetAllStores} from '../../util/zustand' import {usePushState} from '../push' afterEach(() => { resetAllStores() }) test('desktop push store reports resettable defaults', async () => { const {dispatch} = usePushState.getState() await expect(dispatch.checkPermissions()).resolves.toBe(false) dispatch.clearPendingPushNotification() await dispatch.deleteTokenForLogout() dispatch.initialPermissionsCheck() dispatch.rejectPermissions() dispatch.requestPermissions() dispatch.setPushToken('token') dispatch.showPermissionsPrompt({}) expect(usePushState.getState()).toMatchObject({ hasPermissions: false, justSignedUp: false, showPushPrompt: false, token: '', }) })