html.test.ts
This file
Path
src/utils/html.test.ts
16 lines 路 529 bytes 路 TypeScript
Last changed by
Not known.
History of this fileTake it
1234567891011121314151617import { escapeToBuffer } from './html'import type { StringBuffer } from './html'
describe('HTML utilities', () => { describe('escapeToBuffer', () => { it('Should escape special characters', () => { let buffer: StringBuffer = [''] escapeToBuffer('I <b>think</b> this is good.', buffer) expect(buffer[0]).toBe('I <b>think</b> this is good.')
buffer = [''] escapeToBuffer('John "Johnny" Smith', buffer) expect(buffer[0]).toBe('John "Johnny" Smith') }) })})