diff options
| author | Vojta Jina | 2012-03-17 03:10:03 -0700 |
|---|---|---|
| committer | Igor Minar | 2012-03-29 07:22:13 -0700 |
| commit | 4557881cf84f168855fc8615e174f24d6c2dd6ce (patch) | |
| tree | fbc956578b95dc1af6ffa85158fe55fbba44b175 /changelog.spec.js | |
| parent | af0ad6561c0d75c4f155b07e9cfc36a983af55bd (diff) | |
| download | angular.js-4557881cf84f168855fc8615e174f24d6c2dd6ce.tar.bz2 | |
chore(release scripts): auto release scripts
Diffstat (limited to 'changelog.spec.js')
| -rw-r--r-- | changelog.spec.js | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/changelog.spec.js b/changelog.spec.js new file mode 100644 index 00000000..1d3b7fe8 --- /dev/null +++ b/changelog.spec.js @@ -0,0 +1,43 @@ +describe('changelog.js', function() { + var ch = require('./changelog'); + + describe('parseRawCommit', function() { + it('should parse raw commit', function() { + var msg = ch.parseRawCommit( + '9b1aff905b638aa274a5fc8f88662df446d374bd\n' + + 'feat(scope): broadcast $destroy event on scope destruction\n' + + 'perf testing shows that in chrome this change adds 5-15% overhead\n' + + 'when destroying 10k nested scopes where each scope has a $destroy listener\n'); + + expect(msg.type).toBe('feat'); + expect(msg.hash).toBe('9b1aff905b638aa274a5fc8f88662df446d374bd'); + expect(msg.subject).toBe('broadcast $destroy event on scope destruction'); + expect(msg.body).toBe('perf testing shows that in chrome this change adds 5-15% overhead\n' + + 'when destroying 10k nested scopes where each scope has a $destroy listener\n') + expect(msg.component).toBe('scope'); + }); + + + it('should parse closed issues', function() { + var msg = ch.parseRawCommit( + '13f31602f396bc269076ab4d389cfd8ca94b20ba\n' + + 'feat(ng-list): Allow custom separator\n' + + 'bla bla bla\n\n' + + 'Closes #123\nCloses #25\n'); + + expect(msg.closes).toEqual([123, 25]); + }); + + + it('should parse breaking changes', function() { + var msg = ch.parseRawCommit( + '13f31602f396bc269076ab4d389cfd8ca94b20ba\n' + + 'feat(ng-list): Allow custom separator\n' + + 'bla bla bla\n\n' + + 'Breaks first breaking change\nsomething else\n' + + 'Breaks another breaking change\n'); + + expect(msg.breaks).toEqual(['first breaking change', 'another breaking change']); + }); + }); +}); |
