@@ -20,7 +20,7 @@ describe('angular preset', function() {
20
20
// fix this once https://github.com/arturadib/shelljs/issues/175 is solved
21
21
child . exec ( 'git commit -m"feat: amazing new module\n\nBREAKING CHANGE: Not backward compatible." --allow-empty' , function ( ) {
22
22
gitDummyCommit ( [ 'fix(compile): avoid a bug' , 'BREAKING CHANGE: The Change is huge.' ] ) ;
23
- gitDummyCommit ( 'perf(ngOptions): make it faster closes #1, #2' ) ;
23
+ gitDummyCommit ( [ 'perf(ngOptions): make it faster' , ' closes #1, #2'] ) ;
24
24
gitDummyCommit ( 'revert(ngOptions): bad commit' ) ;
25
25
gitDummyCommit ( 'fix(*): oops' ) ;
26
26
@@ -79,6 +79,23 @@ describe('angular preset', function() {
79
79
} ) ) ;
80
80
} ) ;
81
81
82
+ it ( 'should remove the issues that already appear in the subject' , function ( done ) {
83
+ gitDummyCommit ( [ 'feat(awesome): fix #88' ] ) ;
84
+
85
+ conventionalChangelogCore ( {
86
+ config : preset
87
+ } )
88
+ . on ( 'error' , function ( err ) {
89
+ done ( err ) ;
90
+ } )
91
+ . pipe ( through ( function ( chunk ) {
92
+ chunk = chunk . toString ( ) ;
93
+ expect ( chunk ) . to . include ( '[#88](https://github.com/conventional-changelog/conventional-changelog-angular/issues/88)' ) ;
94
+ expect ( chunk ) . to . not . include ( 'closes [#88](https://github.com/conventional-changelog/conventional-changelog-angular/issues/88)' ) ;
95
+ done ( ) ;
96
+ } ) ) ;
97
+ } ) ;
98
+
82
99
it ( 'should replace @username with GitHub user URL' , function ( done ) {
83
100
gitDummyCommit ( [ 'feat(awesome): issue brought up by @bcoe! on Friday' ] ) ;
84
101
0 commit comments