/
dimamir
/
node-xml-toolkit
Обзор
Документация
Войти
/
dimamir
/
node-xml-toolkit
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
__tests__/AttributesMap.js
18 строк
483 B
Dmitry Ovsyanko
AttributesMap: parsing attributes (ported from SAXEvent.writeAttributesToMap)
10 ноя 2024, 14:14
10 ноя 2024, 14:14
5f6b1bc
Код
Авторство
О чём код?
const {AttributesMap} = require ('../') test ('bad', () => { expect (() => new AttributesMap ('href=`#`')).toThrow () expect (() => new AttributesMap ('href=')).toThrow () expect (() => new AttributesMap ('href="#" =""')).toThrow () expect (() => new AttributesMap ('href="#')).toThrow () }) test ('basic', () => { expect (Object.fromEntries (new AttributesMap (`href="#" name = '1' id="" `))).toStrictEqual ({href: '#', name: '1', id: null}) })