Files
releases/docs/book/node_modules/html-escape/test.js
T
Torin Sandall fa9ae9437c Vendor node_modules for gitbook
The gitbook install has been incredibly flaky due to it's dependency on
npm. This commit simply vendors the node_modules so that each time we
build the site the process doesn't have to re-run gitbook install.

Signed-off-by: Torin Sandall <torinsandall@gmail.com>
2018-11-26 15:10:14 -08:00

13 lines
408 B
JavaScript

var test = require("tape");
var escape = require("./");
test("escaping", function(t) {
t.equal(escape("no escape"), "no escape");
t.equal(escape("foo&bar"), "foo&amp;bar");
t.equal(escape("<tag>"), "&lt;tag&gt;");
t.equal(escape("test=\'foo\'"), "test=&#39;foo&#39;");
t.equal(escape("test=\"foo\""), "test=&quot;foo&quot;");
t.equal(escape("<ta'&g\">"), "&lt;ta&#39;&amp;g&quot;&gt;");
t.end();
});