This repository was archived by the owner on Feb 5, 2018. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +36
-2
lines changed Expand file tree Collapse file tree 3 files changed +36
-2
lines changed Original file line number Diff line number Diff line change 4
4
{{ ~else ~}}
5
5
#
6
6
{{ ~/if }} {{ #if @root.linkCompare ~}}
7
- [{{ version }} ]({{ @root.host }} /
7
+ [{{ version }} ](
8
+ {{ ~#if @root.host }}
9
+ {{~ @root.host }} /
10
+ {{ ~/if }}
8
11
{{ ~#if @root.owner }}
9
12
{{~ @root.owner }} /
10
13
{{ ~/if }}
Original file line number Diff line number Diff line change
1
+ {
2
+ "repository" : " unknown" ,
3
+ "version" : " v2.0.0"
4
+ }
Original file line number Diff line number Diff line change 1
1
'use strict' ;
2
2
var child = require ( 'child_process' ) ;
3
3
var conventionalChangelogCore = require ( 'conventional-changelog-core' ) ;
4
- var preset = require ( './' ) ;
4
+ var preset = require ( '.. /' ) ;
5
5
var expect = require ( 'chai' ) . expect ;
6
6
var gitDummyCommit = require ( 'git-dummy-commit' ) ;
7
7
var shell = require ( 'shelljs' ) ;
@@ -147,4 +147,31 @@ describe('angular preset', function() {
147
147
done ( ) ;
148
148
} ) ) ;
149
149
} ) ;
150
+
151
+ it ( 'should work with unknown host' , function ( done ) {
152
+ var i = 0 ;
153
+
154
+ conventionalChangelogCore ( {
155
+ config : preset ,
156
+ pkg : {
157
+ path : __dirname + '/fixtures/_unknown-host.json'
158
+ } ,
159
+ } )
160
+ . on ( 'error' , function ( err ) {
161
+ done ( err ) ;
162
+ } )
163
+ . pipe ( through ( function ( chunk , enc , cb ) {
164
+ chunk = chunk . toString ( ) ;
165
+
166
+ expect ( chunk ) . to . include ( '(http://unknown/compare' ) ;
167
+ expect ( chunk ) . to . include ( '](http://unknown/commits/' ) ;
168
+
169
+ i ++ ;
170
+ cb ( ) ;
171
+ } , function ( ) {
172
+ expect ( i ) . to . equal ( 1 ) ;
173
+ done ( ) ;
174
+ } ) ) ;
175
+ } ) ;
176
+
150
177
} ) ;
You can’t perform that action at this time.
0 commit comments