Skip to content
Myr

html.test.ts

This file

Path

src/utils/html.test.ts

16 lines · 529 bytes · TypeScript

Last changed by

Not known.

History of this file

Take it

The walk stopped after 200 commits: lines older than 7ee829b point at it.

v4.4.7Yusuke Wadabefore adoption7ee829b

lines 1–16why, one step back
1import { escapeToBuffer } from './html'
2import type { StringBuffer } from './html'34describe('HTML utilities', () => {5 describe('escapeToBuffer', () => {6 it('Should escape special characters', () => {7 let buffer: StringBuffer = ['']8 escapeToBuffer('I <b>think</b> this is good.', buffer)9 expect(buffer[0]).toBe('I &lt;b&gt;think&lt;/b&gt; this is good.')1011 buffer = ['']12 escapeToBuffer('John "Johnny" Smith', buffer)13 expect(buffer[0]).toBe('John &quot;Johnny&quot; Smith')14 })15 })16})