File tree 1 file changed +21
-0
lines changed 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -1164,6 +1164,27 @@ describe('standard-version', function () {
1164
1164
shell . exec ( 'git log --oneline -n1' ) . should . include ( '1.1.0 is the version.' )
1165
1165
} )
1166
1166
1167
+ it ( '.versionrc : issuePrefixes' , function ( ) {
1168
+ // write configuration that overrides default issuePrefixes
1169
+ // and reference prefix in issue URL format.
1170
+ fs . writeFileSync ( '.versionrc' , JSON . stringify ( {
1171
+ issueUrlFormat : 'http://www.foo.com/{{prefix}}{{id}}' ,
1172
+ issuePrefixes : [ 'ABC-' ]
1173
+ } ) , 'utf-8' )
1174
+ commit ( 'feat: another commit addresses issue ABC-1' )
1175
+ execCli ( )
1176
+ // CHANGELOG should have the new issue URL format.
1177
+ const content = fs . readFileSync ( 'CHANGELOG.md' , 'utf-8' )
1178
+ content . should . include ( 'http://www.foo.com/ABC-1' )
1179
+ } )
1180
+
1181
+ it ( '--issuePrefixes and --issueUrlFormat' , function ( ) {
1182
+ commit ( 'feat: another commit addresses issue ABC-1' )
1183
+ execCli ( '--issuePrefixes="ABC-" --issueUrlFormat="http://www.foo.com/{{prefix}}{{id}}"' )
1184
+ const content = fs . readFileSync ( 'CHANGELOG.md' , 'utf-8' )
1185
+ content . should . include ( 'http://www.foo.com/ABC-1' )
1186
+ } )
1187
+
1167
1188
it ( '[LEGACY] supports --message (and single %s replacement)' , function ( ) {
1168
1189
commit ( 'feat: another commit addresses issue #1' )
1169
1190
execCli ( '--message="V:%s"' )
You can’t perform that action at this time.
0 commit comments