scratch-vm/test/unit/util_xml.js
Ray Schamp bafdf8d9f2 Use ES6 linting rules in the project root
Update all tests for `no-var` and `prefer-arrow-callback` (using `--fix`)
2017-04-24 15:37:58 -04:00

9 lines
296 B
JavaScript

const test = require('tap').test;
const xml = require('../../src/util/xml-escape');
test('escape', t => {
const input = '<foo bar="he & llo \'"></foo>';
const output = '&lt;foo bar=&quot;he &amp; llo &apos;&quot;&gt;&lt;/foo&gt;';
t.strictEqual(xml(input), output);
t.end();
});