source: trip-planner-front/node_modules/html-escaper/test/index.js

Last change on this file was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 459 bytes
Line 
1delete Object.freeze;
2
3var html = require('../cjs');
4
5console.assert(
6 html.escape('&<>\'"') === '&amp;&lt;&gt;&#39;&quot;',
7 'correct escape'
8);
9
10console.assert(
11 html.escape('<>\'"&') === '&lt;&gt;&#39;&quot;&amp;',
12 'correct inverted escape'
13);
14
15console.assert(
16 '&<>\'"' === html.unescape('&amp;&lt;&gt;&#39;&quot;'),
17 'correct unescape'
18);
19
20console.assert(
21 '<>\'"&' === html.unescape('&lt;&gt;&#39;&quot;&amp;'),
22 'correct inverted unescape'
23);
Note: See TracBrowser for help on using the repository browser.