html.test.ts
This file
Path
src/utils/html.test.ts
8 lines · 302 bytes · TypeScript
Last changed by
refactor(html): make `html` as middleware (#319)Yusuke Wadabefore adoption5976a60
History of this fileTake it
refactor(html): make `html` as middleware (#319)Yusuke Wadabefore adoption5976a60
line 1why, one step back1import { escape } from './html'Merge pull request #306 from honojs/feat/jsxYusuke Wadabefore adoption583d3d4
lines 2–8why, one step back23describe('HTML escape', () => {4 it('Should escape special characters', () => {5 expect(escape('I <b>think</b> this is good.')).toBe('I <b>think</b> this is good.')6 expect(escape('John "Johnny" Smith')).toBe('John "Johnny" Smith')7 })8})