/
githubmirror
/
gutenberg
Обзор
Документация
Войти
/
githubmirror
/
gutenberg
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
trunk
packages/block-library/src/code/test/utils.js
20 строк
672 B
Marco Ciampini
ESLint: Replace strict config with bulk suppressions (#81248)
07 авг 2026, 14:34
Не верифицирован
07 авг 2026, 14:34
7f43eaf
Код
Авторство
О чём код?
import { escape } from '../utils'; describe( 'core/code', () => { describe( 'escape()', () => { it( 'should escape opening square brackets', () => { const text = escape( '[shortcode][/shortcode]' ); expect( text ).toBe( '[shortcode][/shortcode]' ); } ); it( 'should escape the protocol of an isolated url', () => { const text = escape( 'https://example.com/test/' ); expect( text ).toBe( 'https://example.com/test/' ); } ); it( 'should not escape the protocol of a non isolated url', () => { const text = escape( 'Text https://example.com/test/' ); expect( text ).toBe( 'Text https://example.com/test/' ); } ); } ); } );