@@ -107,7 +107,7 @@ describe('change command', () => {
107
107
await waitForPrompt ( ) ;
108
108
109
109
// Use default change type and custom message
110
- expect ( logs . mocks . log ) . toHaveBeenLastCalledWith ( 'Please describe the changes for: foo' ) ;
110
+ expect ( logs . mocks . log ) . toHaveBeenLastCalledWith ( 'Please describe the changes for: foo (currently v1.0.0) ' ) ;
111
111
await stdin . sendByChar ( '\n' ) ;
112
112
// Also verify that the options shown are correct
113
113
expect ( stdout . lastOutput ( ) ) . toMatchInlineSnapshot ( `
@@ -139,7 +139,7 @@ describe('change command', () => {
139
139
const options = getOptions ( ) ;
140
140
const changePromise = change ( options ) ;
141
141
142
- expect ( logs . mocks . log ) . toHaveBeenLastCalledWith ( 'Please describe the changes for: foo' ) ;
142
+ expect ( logs . mocks . log ) . toHaveBeenLastCalledWith ( 'Please describe the changes for: foo (currently v1.0.0) ' ) ;
143
143
await stdin . sendByChar ( '\n' ) ; // default change type
144
144
await stdin . sendByChar ( 'commit me please\n' ) ; // custom message
145
145
await changePromise ;
@@ -170,7 +170,7 @@ describe('change command', () => {
170
170
} ) ;
171
171
const changePromise = change ( options ) ;
172
172
173
- expect ( logs . mocks . log ) . toHaveBeenLastCalledWith ( 'Please describe the changes for: foo' ) ;
173
+ expect ( logs . mocks . log ) . toHaveBeenLastCalledWith ( 'Please describe the changes for: foo (currently v1.0.0) ' ) ;
174
174
await stdin . sendByChar ( '\n' ) ; // default change type
175
175
await stdin . sendByChar ( 'commit me please\n' ) ; // custom message
176
176
await changePromise ;
@@ -198,7 +198,7 @@ describe('change command', () => {
198
198
const changePromise = change ( options ) ;
199
199
await waitForPrompt ( ) ;
200
200
201
- expect ( logs . mocks . log ) . toHaveBeenLastCalledWith ( 'Please describe the changes for: foo' ) ;
201
+ expect ( logs . mocks . log ) . toHaveBeenLastCalledWith ( 'Please describe the changes for: foo (currently v1.0.0) ' ) ;
202
202
await stdin . sendByChar ( '\n' ) ; // default change type
203
203
await stdin . sendByChar ( 'stage me please\n' ) ; // custom message
204
204
await changePromise ;
@@ -218,7 +218,7 @@ describe('change command', () => {
218
218
const changePromise = change ( options ) ;
219
219
220
220
// use custom values for first package
221
- expect ( logs . mocks . log ) . toHaveBeenLastCalledWith ( 'Please describe the changes for: pkg-1' ) ;
221
+ expect ( logs . mocks . log ) . toHaveBeenLastCalledWith ( 'Please describe the changes for: pkg-1 (currently v1.0.0) ' ) ;
222
222
stdin . emitKey ( { name : 'down' } ) ;
223
223
await stdin . sendByChar ( '\n' ) ;
224
224
// also verify that the options shown are correct
@@ -230,7 +230,7 @@ describe('change command', () => {
230
230
await stdin . sendByChar ( 'custom\n' ) ;
231
231
232
232
// use defaults for second package
233
- expect ( logs . mocks . log ) . toHaveBeenLastCalledWith ( 'Please describe the changes for: pkg-2' ) ;
233
+ expect ( logs . mocks . log ) . toHaveBeenLastCalledWith ( 'Please describe the changes for: pkg-2 (currently v1.0.0) ' ) ;
234
234
await stdin . sendByChar ( '\n\n' ) ;
235
235
236
236
await changePromise ;
@@ -260,13 +260,13 @@ describe('change command', () => {
260
260
const changePromise = change ( options ) ;
261
261
262
262
// use custom values for first package
263
- expect ( logs . mocks . log ) . toHaveBeenLastCalledWith ( 'Please describe the changes for: pkg-1' ) ;
263
+ expect ( logs . mocks . log ) . toHaveBeenLastCalledWith ( 'Please describe the changes for: pkg-1 (currently v1.0.0) ' ) ;
264
264
stdin . emitKey ( { name : 'down' } ) ;
265
265
await stdin . sendByChar ( '\n' ) ;
266
266
await stdin . sendByChar ( 'custom\n' ) ;
267
267
268
268
// use defaults for second package
269
- expect ( logs . mocks . log ) . toHaveBeenLastCalledWith ( 'Please describe the changes for: pkg-2' ) ;
269
+ expect ( logs . mocks . log ) . toHaveBeenLastCalledWith ( 'Please describe the changes for: pkg-2 (currently v1.0.0) ' ) ;
270
270
await stdin . sendByChar ( '\n\n' ) ;
271
271
272
272
await changePromise ;
@@ -305,13 +305,13 @@ describe('change command', () => {
305
305
const changePromise = change ( options ) ;
306
306
await waitForPrompt ( ) ;
307
307
308
- expect ( logs . mocks . log ) . toHaveBeenLastCalledWith ( 'Please describe the changes for: pkg-1' ) ;
308
+ expect ( logs . mocks . log ) . toHaveBeenLastCalledWith ( 'Please describe the changes for: pkg-1 (currently v1.0.0) ' ) ;
309
309
expect ( stdout . lastOutput ( ) ) . toMatch ( / C h a n g e t y p e / ) ;
310
310
await stdin . sendByChar ( '\n' ) ;
311
311
expect ( stdout . lastOutput ( ) ) . toMatch ( / D e s c r i b e c h a n g e s / ) ;
312
312
await stdin . sendByChar ( '\n' ) ;
313
313
314
- expect ( logs . mocks . log ) . toHaveBeenLastCalledWith ( 'Please describe the changes for: pkg-2' ) ;
314
+ expect ( logs . mocks . log ) . toHaveBeenLastCalledWith ( 'Please describe the changes for: pkg-2 (currently v1.0.0) ' ) ;
315
315
expect ( stdout . lastOutput ( ) ) . toMatch ( / c u s t o m q u e s t i o n / ) ;
316
316
await stdin . sendByChar ( 'stuff\n' ) ;
317
317
expect ( stdout . lastOutput ( ) ) . toMatch ( / C h a n g e t y p e / ) ;
0 commit comments