/
githubmirror
/
client
Обзор
Документация
Войти
/
githubmirror
/
client
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
shared/stores/tests/settings-email.test.ts
26 строк
824 B
chrisnojima-zoom
Version 670 - clean2 (#29122)
08 июн 2026, 19:31
Не верифицирован
08 июн 2026, 19:31
1943197
Код
Авторство
О чём код?
/// <reference types="jest" /> import {resetAllStores} from '@/util/zustand' import {useSettingsEmailState} from '../settings-email' afterEach(() => { jest.restoreAllMocks() resetAllStores() }) test('email change notifications populate the email map and verification updates the row', () => { useSettingsEmailState.getState().dispatch.notifyEmailAddressEmailsChanged([ { email: 'alice@example.com', isPrimary: false, isVerified: false, lastVerifyEmailDate: 0, visibility: 0, } as any, ]) expect(useSettingsEmailState.getState().emails.get('alice@example.com')?.isVerified).toBe(false) useSettingsEmailState.getState().dispatch.notifyEmailVerified('alice@example.com') expect(useSettingsEmailState.getState().emails.get('alice@example.com')?.isVerified).toBe(true) })