/
githubmirror
/
gutenberg
Обзор
Документация
Войти
/
githubmirror
/
gutenberg
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
trunk
packages/interface/src/store/test/reducer.js
27 строк
623 B
Marco Ciampini
ESLint: Replace strict config with bulk suppressions (#81248)
07 авг 2026, 14:34
Не верифицирован
07 авг 2026, 14:34
7f43eaf
Код
Авторство
О чём код?
import { activeModal } from '../reducer'; describe( 'state', () => { describe( 'activeModal', () => { it( 'should default to null', () => { const state = activeModal( undefined, {} ); expect( state ).toBeNull(); } ); it( 'should set the activeModal to the provided name', () => { const state = activeModal( null, { type: 'OPEN_MODAL', name: 'test-modal', } ); expect( state ).toEqual( 'test-modal' ); } ); it( 'should set the activeModal to null', () => { const state = activeModal( 'test-modal', { type: 'CLOSE_MODAL', } ); expect( state ).toBeNull(); } ); } ); } );