/
githubmirror
/
gutenberg
Обзор
Документация
Войти
/
githubmirror
/
gutenberg
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
trunk
packages/element/src/test/platform.js
20 строк
439 B
Marco Ciampini
ESLint: Replace strict config with bulk suppressions (#81248)
07 авг 2026, 14:34
Не верифицирован
07 авг 2026, 14:34
7f43eaf
Код
Авторство
О чём код?
import Platform from '../platform'; describe( 'Platform', () => { it( 'selects the web value', () => { const element = Platform.select( { web: <div />, default: <button />, } ); expect( element ).toEqual( <div /> ); } ); it( 'falls back to the default value when no web value is provided', () => { const element = Platform.select( { default: <button />, } ); expect( element ).toEqual( <button /> ); } ); } );