/
githubmirror
/
gutenberg
Обзор
Документация
Войти
/
githubmirror
/
gutenberg
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
trunk
packages/interface/src/store/test/selectors.js
29 строк
801 B
Marco Ciampini
ESLint: Replace strict config with bulk suppressions (#81248)
07 авг 2026, 14:34
Не верифицирован
07 авг 2026, 14:34
7f43eaf
Код
Авторство
О чём код?
import { isModalActive } from '../selectors'; describe( 'selectors', () => { describe( 'isModalActive', () => { it( 'returns true if the provided name matches the value in the preferences activeModal property', () => { const state = { activeModal: 'test-modal', }; expect( isModalActive( state, 'test-modal' ) ).toBe( true ); } ); it( 'returns false if the provided name does not match the preferences activeModal property', () => { const state = { activeModal: 'something-else', }; expect( isModalActive( state, 'test-modal' ) ).toBe( false ); } ); it( 'returns false if the preferences activeModal property is null', () => { const state = { activeModal: null, }; expect( isModalActive( state, 'test-modal' ) ).toBe( false ); } ); } ); } );