/
githubmirror
/
meteor
Обзор
Документация
Войти
/
githubmirror
/
meteor
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
devel
packages/ecmascript/runtime-client-tests.js
22 строки
619 B
zodern
Consistent naming for test files
14 апр 2023, 23:53
14 апр 2023, 23:53
216bbcb
Код
Авторство
О чём код?
// Regression test for web.browser.legacy - see https://github.com/meteor/meteor/issues/11662 Tinytest.add('ecmascript - runtime - NodeList spread', test => { const div = document.createElement('div'); document.body.appendChild(div); for (let i = 0; i < 5; i++) { const child = document.createElement('div'); child.innerText = `child ${i}`; div.appendChild(child); } try { test.equal(div.childNodes?.length, 5); const arr = [...div.childNodes]; arr.forEach((el, i) => { test.equal(el.innerText, `child ${i}`); }); } finally { document.body.removeChild(div); } });