diff options
Diffstat (limited to 'docs/spec/collectSpec.js')
| -rw-r--r-- | docs/spec/collectSpec.js | 10 |
1 files changed, 10 insertions, 0 deletions
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'); + }); + }); }); |
