UNPKG

shunter

Version:

A Node.js application built to read JSON and translate it into HTML

18 lines (14 loc) 469 B
'use strict'; var assert = require('proclaim'); var helper = require('../../helpers/template.js')(); describe('Dust Filter: amp', function() { it('Should safely html-escape ampersands', function(done) { helper.render('{test1|s|amp} {test2|s|amp}', { test1: '<p>A & B</p>', test2: '<p>A &gt; & &#x8212; B &amp;</p>' }, function(err, dom, str) { assert.strictEqual(str, '<p>A &amp; B</p> <p>A &gt; &amp; &#x8212; B &amp;</p>'); done(); }); }); });