mirror of
https://github.com/zebrajr/express.git
synced 2026-01-15 12:15:27 +00:00
Added utils.escape(html) test
This commit is contained in:
@@ -18,8 +18,14 @@ describe('utils.isAbsolute()', function(){
|
||||
describe('utils.flatten(arr)', function(){
|
||||
it('should flatten an array', function(){
|
||||
var arr = ['one', ['two', ['three', 'four'], 'five']];
|
||||
utils
|
||||
.flatten(arr)
|
||||
utils.flatten(arr)
|
||||
.should.eql(['one', 'two', 'three', 'four', 'five']);
|
||||
})
|
||||
})
|
||||
|
||||
describe('utils.escape(html)', function(){
|
||||
it('should escape html entities', function(){
|
||||
utils.escape('<script>foo & "bar"')
|
||||
.should.equal('<script>foo & "bar"')
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user