File tree Expand file tree Collapse file tree
packages/angular/cli/utilities
tests/legacy-cli/e2e/tests/generate Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -151,26 +151,23 @@ export async function parseJsonSchemaToOptions(
151151 }
152152
153153 let defaultValue : string | number | boolean | undefined = undefined ;
154- if ( schema . default !== undefined ) {
154+ if ( current . default !== undefined ) {
155155 switch ( types [ 0 ] ) {
156156 case 'string' :
157- if ( typeof schema . default == 'string' ) {
158- defaultValue = schema . default ;
157+ if ( typeof current . default == 'string' ) {
158+ defaultValue = current . default ;
159159 }
160160 break ;
161161 case 'number' :
162- if ( typeof schema . default == 'number' ) {
163- defaultValue = schema . default ;
162+ if ( typeof current . default == 'number' ) {
163+ defaultValue = current . default ;
164164 }
165165 break ;
166166 case 'boolean' :
167- if ( typeof schema . default == 'boolean' ) {
168- defaultValue = schema . default ;
167+ if ( typeof current . default == 'boolean' ) {
168+ defaultValue = current . default ;
169169 }
170170 break ;
171-
172- default :
173- console . log ( types [ 0 ] , schema ) ;
174171 }
175172 }
176173
Original file line number Diff line number Diff line change @@ -88,7 +88,7 @@ export default function() {
8888 . then ( ( ) => ng ( 'generate' , 'fake' , '--help' ) )
8989 // verify same output
9090 . then ( ( { stdout} ) => {
91- if ( ! / n g g e n e r a t e f a k e - s c h e m a t i c s : f a k e < a > < b > \[ o p t i o n s \] / . test ( stdout ) ) {
91+ if ( ! / n g g e n e r a t e f a k e < a > < b > \[ o p t i o n s \] / . test ( stdout ) ) {
9292 throw new Error ( 'Help signature is wrong (2).' ) ;
9393 }
9494 if ( ! / o p t - a [ \s \S ] * o p t - b [ \s \S ] * o p t - c / . test ( stdout ) ) {
You can’t perform that action at this time.
0 commit comments