* Converts a list of attributes to a comma separated string. * @param {!Array<!Object>} attrs * @return {string}
(attrs)
| 74 | * @return {string} |
| 75 | */ |
| 76 | attrsToString(attrs) { |
| 77 | let str = '['; |
| 78 | let first = true; |
| 79 | for (const attr of attrs) { |
| 80 | if (first) { |
| 81 | first = false; |
| 82 | } else { |
| 83 | str += ','; |
| 84 | } |
| 85 | str += attr.name + ',' + attr.value; |
| 86 | } |
| 87 | str += ']'; |
| 88 | return str; |
| 89 | } |
| 90 | } |
| 91 | |
| 92 | describe('HtmlParser', () => { |
no outgoing calls
no test coverage detected