/
githubmirror
/
wp-calypso
Обзор
Документация
Войти
/
githubmirror
/
wp-calypso
Код
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
trunk
packages/data-stores/src/theme/test/utils.ts
13 строк
521 B
arthur791004
Virtual Themes: Switch to the assembleSite endpoint to get rid of the headstart (#80734)
21 авг 2023, 09:19
Не верифицирован
21 авг 2023, 09:19
d7a2778
Код
Авторство
О чём код?
import { getThemeIdFromStylesheet } from '../utils'; describe( '#getThemeIdFromStylesheet()', () => { test( "should return the argument if it doesn't contain a slash (/)", () => { const themeId = getThemeIdFromStylesheet( 'twentysixteen' ); expect( themeId ).toEqual( 'twentysixteen' ); } ); test( "should return argument's part after the slash if it does contain a slash (/)", () => { const themeId = getThemeIdFromStylesheet( 'pub/twentysixteen' ); expect( themeId ).toEqual( 'twentysixteen' ); } ); } );