/
githubmirror
/
amphtml
Обзор
Документация
Войти
/
githubmirror
/
amphtml
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
build-system/server/app-index/test/test-html.js
23 строки
658 B
Kristofer Baxter
♻️ Remove Notice from JS and Markdown (#35717)
19 авг 2021, 21:21
Не верифицирован
19 авг 2021, 21:21
f564b7e
Код
Авторство
О чём код?
const test = require('ava'); const {html, joinFragments} = require('../html'); test('joinFragments joins simple fragments', (t) => { t.is(joinFragments(['a', 'b', 'c']), 'abc'); }); test('joinFragments joins mapped fragments', (t) => { t.is( joinFragments([1, 2, 3], (a) => a + 1), '234' ); }); test('tagged literal passes through simple string', (t) => { t.is(html`foo`, 'foo'); }); test('tagged literal concatenates interpolated args', (t) => { // eslint-disable-next-line local/html-template const interpolated = html`quesadilla ${'de'} chicharrón ${'con'} queso`; t.is(interpolated, 'quesadilla de chicharrón con queso'); });