/
githubmirror
/
amphtml
Обзор
Документация
Войти
/
githubmirror
/
amphtml
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
test/unit/core/dom/test-css-selectors.js
32 строки
862 B
Kristofer Baxter
♻️ Remove Notice from JS and Markdown (#35717)
19 авг 2021, 21:21
Не верифицирован
19 авг 2021, 21:21
f564b7e
Код
Авторство
О чём код?
import { escapeCssSelectorIdent, prependSelectorsWith, } from '#core/dom/css-selectors'; describes.sandboxed('DOM - CSS selectors', {}, () => { describe('escapeCssSelectorIdent', () => { it('should escape', () => { expect(escapeCssSelectorIdent('a b')).to.equal('a\\ b'); }); }); describe('scopeSelector', () => { it('concats simple', () => { expect(prependSelectorsWith('div', '.i-amphtml-scoped')).to.equal( '.i-amphtml-scoped div' ); }); it('concats multiple selectors (2)', () => { expect(prependSelectorsWith('div,ul', ':scope')).to.equal( ':scope div,:scope ul' ); }); it('concats multiple selectors (4)', () => { expect(prependSelectorsWith('div,ul,ol,section', 'div >')).to.equal( 'div > div,div > ul,div > ol,div > section' ); }); }); });