From a7e8a503fd088f5b01e8b14de61dfc60c1f13451 Mon Sep 17 00:00:00 2001 From: Misko Hevery Date: Tue, 9 Nov 2010 11:22:52 -0800 Subject: proper trimming of leading whitespace; url restriction to angular.* --- docs/spec/collectSpec.js | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'docs/spec/collectSpec.js') diff --git a/docs/spec/collectSpec.js b/docs/spec/collectSpec.js index 371438f5..fbc6c489 100644 --- a/docs/spec/collectSpec.js +++ b/docs/spec/collectSpec.js @@ -58,6 +58,16 @@ describe('collect', function(){ }); + describe('trim', function(){ + var trim = collect.trim; + it('should remove leading/trailing space', function(){ + expect(trim(' \nabc\n ')).toEqual('abc'); + }); + + it('should remove leading space on every line', function(){ + expect(trim('\n 1\n 2\n 3\n')).toEqual('1\n 2\n 3'); + }); + }); }); -- cgit v1.2.3