Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 44 lines (35 sloc) 1.732 kb
4557881 Vojta Jina chore(release scripts): auto release scripts
vojtajina authored
1 describe('changelog.js', function() {
2 var ch = require('./changelog');
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 listener\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 listener\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' +
07a58dd Igor Minar chore(changelog.js): improve the changelog script
IgorMinar authored
37 'BREAKING CHANGE: first breaking change\nsomething else\n' +
38 'another line with more info\n');
4557881 Vojta Jina chore(release scripts): auto release scripts
vojtajina authored
39
07a58dd Igor Minar chore(changelog.js): improve the changelog script
IgorMinar authored
40 expect(msg.breaking).toEqual(' first breaking change\nsomething else\nanother line with more info\n');
4557881 Vojta Jina chore(release scripts): auto release scripts
vojtajina authored
41 });
42 });
43 });
Something went wrong with that request. Please try again.