File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -155,6 +155,30 @@ describe('init', function () {
155
155
156
156
} ) ;
157
157
158
+ it ( 'installs an commitizen with includeCommitizen' , function ( ) {
159
+
160
+ this . timeout ( config . maxTimeout ) ; // this could take a while
161
+
162
+ // SETUP
163
+
164
+ // Add a first adapter
165
+ sh . cd ( config . paths . endUserRepo ) ;
166
+ commitizenInit ( sh , config . paths . endUserRepo , 'cz-conventional-changelog' , { includeCommitizen : true } ) ;
167
+ let packageJson = util . getParsedPackageJsonFromPath ( config . paths . endUserRepo ) ;
168
+
169
+ // TEST
170
+ expect ( packageJson . devDependencies ) . to . have . property ( 'cz-conventional-changelog' ) ;
171
+ expect ( packageJson . devDependencies ) . to . have . property ( 'commitizen' ) ;
172
+ let range = packageJson . devDependencies [ 'cz-conventional-changelog' ] ;
173
+
174
+ // It should satisfy the requirements of a range
175
+ expect ( semver . validRange ( range ) ) . to . not . equal ( null ) ;
176
+
177
+ // But you CAN increment a single version
178
+ expect ( semver . inc ( range , 'major' ) ) . not . to . equal ( null ) ;
179
+
180
+ } ) ;
181
+
158
182
it ( 'installs an adapter with --yarn' , function ( ) {
159
183
160
184
this . timeout ( config . maxTimeout ) ; // this could take a while
You can’t perform that action at this time.
0 commit comments