UNPKG

395 BJavaScriptView Raw
1describe('JSLintXML', function() {
2 var grunt = require('grunt');
3 var cut = require('../tasks/reporters/XML')(grunt);
4 var expect = require('chai').expect;
5
6 it ('should escape html chars <>', function() {
7 var esc = cut.prototype.escape;
8 var ex1 = esc('<anonymous>');
9 var ex2 = esc('p><d');
10
11 expect(ex1).to.equal('&lt;anonymous&gt;');
12 expect(ex2).to.equal('p&gt;&lt;d');
13 });
14});