diff options
| author | Misko Hevery | 2010-11-09 11:22:52 -0800 |
|---|---|---|
| committer | Igor Minar | 2010-11-09 22:27:37 -0800 |
| commit | a7e8a503fd088f5b01e8b14de61dfc60c1f13451 (patch) | |
| tree | 7fc39b1a96762ed2d41e3ad9cef8441bb0394844 /docs/spec/collectSpec.js | |
| parent | 324694a58b6d0ed33e05b511be4767573d9187dd (diff) | |
| download | angular.js-a7e8a503fd088f5b01e8b14de61dfc60c1f13451.tar.bz2 | |
proper trimming of leading whitespace; url restriction to angular.*
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'); + }); + }); }); |
