| OLD | NEW |
| (Empty) | |
| 1 describe('changelog.js', function() { |
| 2 var ch = require(__dirname + '/changelog.js'); |
| 3 |
| 4 describe('parseRawCommit', function() { |
| 5 it('should parse raw commit', function() { |
| 6 var msg = ch.parseRawCommit( |
| 7 '9b1aff905b638aa274a5fc8f88662df446d374bd\n' + |
| 8 'feat(scope): broadcast $destroy event on scope destruction\n' + |
| 9 'perf testing shows that in chrome this change adds 5-15% overhead\n'
+ |
| 10 'when destroying 10k nested scopes where each scope has a $destroy lis
tener\n'); |
| 11 |
| 12 expect(msg.type).toBe('feat'); |
| 13 expect(msg.hash).toBe('9b1aff905b638aa274a5fc8f88662df446d374bd'); |
| 14 expect(msg.subject).toBe('broadcast $destroy event on scope destruction'); |
| 15 expect(msg.body).toBe('perf testing shows that in chrome this change adds
5-15% overhead\n' + |
| 16 'when destroying 10k nested scopes where each scope has a $destroy lis
tener\n') |
| 17 expect(msg.component).toBe('scope'); |
| 18 }); |
| 19 |
| 20 |
| 21 it('should parse closed issues', function() { |
| 22 var msg = ch.parseRawCommit( |
| 23 '13f31602f396bc269076ab4d389cfd8ca94b20ba\n' + |
| 24 'feat(ng-list): Allow custom separator\n' + |
| 25 'bla bla bla\n\n' + |
| 26 'Closes #123\nCloses #25\n'); |
| 27 |
| 28 expect(msg.closes).toEqual([123, 25]); |
| 29 }); |
| 30 |
| 31 |
| 32 it('should parse breaking changes', function() { |
| 33 var msg = ch.parseRawCommit( |
| 34 '13f31602f396bc269076ab4d389cfd8ca94b20ba\n' + |
| 35 'feat(ng-list): Allow custom separator\n' + |
| 36 'bla bla bla\n\n' + |
| 37 'BREAKING CHANGE: first breaking change\nsomething else\n' + |
| 38 'another line with more info\n'); |
| 39 |
| 40 expect(msg.breaking).toEqual(' first breaking change\nsomething else\nanot
her line with more info\n'); |
| 41 }); |
| 42 }); |
| 43 }); |
| OLD | NEW |