@@ -90,19 +90,19 @@ tap.test('command: upgrade', (suite) => {
90
90
test . plan ( 6 ) ;
91
91
92
92
make ( ) . catch ( ( ) => {
93
- test . ok ( log . firstCall . calledWith ( '[cyan ]Identifying the *newest* angular-librarian version[/cyan ]' ) ) ;
93
+ test . ok ( log . firstCall . calledWith ( '[blue ]Identifying the *newest* Angular Librarian version[/blue ]' ) ) ;
94
94
test . ok ( execute . firstCall . calledWith (
95
95
npm ,
96
96
[ 'show' , 'angular-librarian' , 'version' ]
97
97
) ) ;
98
- test . ok ( log . secondCall . calledWith ( '[blue]Identifying the *installed* angular-librarian version[/blue]' ) ) ;
98
+ test . ok ( log . secondCall . calledWith ( '[blue]Identifying the *installed* Angular Librarian version[/blue]' ) ) ;
99
99
test . ok ( execute . secondCall . calledWith (
100
100
npm ,
101
101
[ 'list' , '--depth=0' , 'angular-librarian' ]
102
102
) ) ;
103
103
test . ok ( gt . calledWith ( '300.0.1' , '300.0.0' ) ) ;
104
104
test . ok ( log . thirdCall . calledWith (
105
- '[yellow]\tUpgrade of angular-librarian is[/yellow]' ,
105
+ '[yellow] Upgrade of Angular Librarian is[/yellow]' ,
106
106
'[red]NOT[/red]' ,
107
107
'[yellow]required.[/yellow]'
108
108
) ) ;
@@ -120,7 +120,7 @@ tap.test('command: upgrade', (suite) => {
120
120
121
121
make ( ) . catch ( ( ) => {
122
122
test . ok ( log . getCall ( 3 ) . calledWith (
123
- '[green] Installing angular-librarian@ 300.0.1[/green ]'
123
+ '[blue]Installing Angular Librarian 300.0.1[/blue ]'
124
124
) ) ;
125
125
test . ok ( execute . thirdCall . calledWith (
126
126
npm ,
@@ -139,7 +139,7 @@ tap.test('command: upgrade', (suite) => {
139
139
test . plan ( 3 ) ;
140
140
141
141
make ( ) . catch ( ( ) => {
142
- test . ok ( log . calledWith ( '[green ]Upgrading angular-librarian from:[/green ]' ) ) ;
142
+ test . ok ( log . calledWith ( '[blue ]Upgrading Angular Librarian from:[/blue ]' ) ) ;
143
143
test . ok ( log . calledWith ( '[magenta] ice-cream[/magenta]' ) ) ;
144
144
test . ok ( execute . calledWith (
145
145
npm ,
@@ -161,7 +161,7 @@ tap.test('command: upgrade', (suite) => {
161
161
{
162
162
allowBlank : true ,
163
163
name : 'proceed' ,
164
- question : 'The following will overwrite some of the files in your project. Would you like to continue (y/N)? ' ,
164
+ question : '[red] The following will overwrite some of the files in your project. Would you like to continue [/red] (y/N)[red]?[/red] ' ,
165
165
transform : 'yes-no'
166
166
}
167
167
] ) ) ;
@@ -193,7 +193,7 @@ tap.test('command: upgrade', (suite) => {
193
193
} ) ;
194
194
} ) ;
195
195
196
- suite . test ( 'should upgrade the files when the user answers yes' , ( test ) => {
196
+ suite . test ( 'should upgrade the files & dependencies when the user answers yes' , ( test ) => {
197
197
const { construct, inquire } = mocks . erector ;
198
198
const { getTemplates, log } = mocks ;
199
199
const answers = [
@@ -228,7 +228,7 @@ tap.test('command: upgrade', (suite) => {
228
228
open . returns ( answers ) ;
229
229
inquire . resetBehavior ( ) ;
230
230
inquire . resolves ( inquireAnswers ) ;
231
- test . plan ( 4 ) ;
231
+ test . plan ( 6 ) ;
232
232
233
233
make ( ) . then ( ( ) => {
234
234
test . ok ( getTemplates . calledWith (
@@ -276,10 +276,18 @@ tap.test('command: upgrade', (suite) => {
276
276
) ) ;
277
277
test . ok ( construct . calledWith ( finalAnswers , 'fake-templates' ) ) ;
278
278
test . ok ( log . calledWith (
279
- '[cyan] Updating managed files to latest versions[/cyan ]'
279
+ '[blue] Updating managed files to latest versions[/blue ]'
280
280
) ) ;
281
281
test . ok ( log . calledWith (
282
- '[green]Files have been upgraded![/green]'
282
+ '[green] Files have been upgraded![/green]'
283
+ ) ) ;
284
+ test . ok ( execute . calledWith (
285
+ npm ,
286
+ [ 'i' ]
287
+ ) ) ;
288
+ test . ok ( execute . calledWith (
289
+ npm ,
290
+ [ 'up' ]
283
291
) ) ;
284
292
285
293
test . end ( ) ;
0 commit comments