1 |
|
2 |
|
3 |
|
4 | var helper = require('../lib/helper')
|
5 | ;
|
6 |
|
7 | require('chai').should();
|
8 |
|
9 | describe('helper.escape()', function() {
|
10 | it('should not escape normal stuff', function() {
|
11 | helper.escape('x y').should.equal('x y');
|
12 | });
|
13 |
|
14 | it('should escape the ampersand', function() {
|
15 | helper.escape('x & y').should.equal('x & y');
|
16 | });
|
17 |
|
18 | it('should escape the greater-than', function() {
|
19 | helper.escape('x > y').should.equal('x > y');
|
20 | });
|
21 |
|
22 | it('should escape the less-than', function() {
|
23 | helper.escape('x < y').should.equal('x < y');
|
24 | });
|
25 |
|
26 | it('should escape the double-quote', function() {
|
27 | helper.escape('x " y').should.equal('x " y');
|
28 | });
|
29 | });
|