@@ -23,24 +23,6 @@ const helpers = require('yeoman-test');
23
23
const fs = require ( 'fs' ) ;
24
24
const PROJECT_NAME = "ProjectName" ;
25
25
26
-
27
-
28
-
29
- describe ( 'error thrown when bluemix parameter is missing' , function ( ) {
30
-
31
- before ( function ( ) {
32
- // Mock the options, set up an output folder and run the generator
33
- return helpers . run ( path . join ( __dirname , '../app' ) )
34
- . withOptions ( { } ) // No parameters!!
35
- . on ( 'error' , function ( ) {
36
- assert ( true ) ;
37
- } )
38
- . toPromise ( function ( ) { // Should never return a promise
39
- assert ( false )
40
- } )
41
- } ) ;
42
- } ) ;
43
-
44
26
describe ( 'core-node-express:app integration test with custom spec' , function ( ) {
45
27
// Express build is slow so we need to set a longer timeout for the test
46
28
this . timeout ( 150000 ) ;
@@ -49,8 +31,8 @@ describe('core-node-express:app integration test with custom spec', function ()
49
31
// Mock the options, set up an output folder and run the generator
50
32
return helpers . run ( path . join ( __dirname , '../app' ) )
51
33
. withOptions ( {
52
- spec : JSON . stringify ( { appname : 'testApp' , port : common . defaultPort } ) ,
53
- bluemix : JSON . stringify ( { name : PROJECT_NAME } )
34
+ bluemix : JSON . stringify ( { name : PROJECT_NAME } ) ,
35
+ spec : JSON . stringify ( { appname : 'testApp' , port : common . defaultPort } )
54
36
} )
55
37
. toPromise ( ) ; // Get a Promise back when the generator finishes
56
38
} ) ;
@@ -67,8 +49,8 @@ describe('core-node-express:app integration test with custom spec', function ()
67
49
} ) ;
68
50
69
51
describe ( 'has a public directory' , function ( ) {
70
- // Files which we assert are created each time the app generator is run.
71
- // Takes an array of files, converted from obj by Object.values().
52
+ // Files which we assert are created each time the app generator is run.
53
+ // Takes an array of files, converted from obj by Object.values().
72
54
it ( 'creates public route' , function ( ) {
73
55
assert . fileContent ( 'server/routers/index.js' , 'require(\'./public\')(app);' ) ;
74
56
} )
@@ -460,11 +442,11 @@ describe('core-node-express:app integration test as microservice', function () {
460
442
this . timeout ( 150000 ) ;
461
443
before ( function ( ) {
462
444
return helpers . run ( path . join ( __dirname , '../app' ) )
463
- . withOptions ( {
464
- spec : JSON . stringify ( { appname : 'testApp' , port : common . defaultPort , applicationType : 'MS' } ) ,
465
- bluemix : JSON . stringify ( { name : PROJECT_NAME } )
466
- } )
467
- . toPromise ( ) ; // Get a Promise back when the generator finishes
445
+ . withOptions ( {
446
+ spec : JSON . stringify ( { appname : 'testApp' , port : common . defaultPort , applicationType : 'MS' } ) ,
447
+ bluemix : JSON . stringify ( { name : PROJECT_NAME } )
448
+ } )
449
+ . toPromise ( ) ; // Get a Promise back when the generator finishes
468
450
} ) ;
469
451
470
452
it ( 'creates health route' , function ( ) {
@@ -484,11 +466,11 @@ describe('core-node-express:app microservice integration test with openApiServic
484
466
let swagger = JSON . parse ( fs . readFileSync ( path . join ( __dirname , '../test/resources/person_dino.json' ) , 'utf8' ) ) ;
485
467
let swagStr = JSON . stringify ( swagger ) ;
486
468
return helpers . run ( path . join ( __dirname , '../app' ) )
487
- . withOptions ( {
488
- spec : JSON . stringify ( { appname : 'testApp' , port : common . defaultPort , isDeployableContainer : true , applicationType : 'MS' } ) ,
489
- bluemix : JSON . stringify ( { name : PROJECT_NAME , openApiServers : [ { spec : swagStr } ] } )
490
- } )
491
- . toPromise ( ) ; // Get a Promise back when the generator finishes
469
+ . withOptions ( {
470
+ spec : JSON . stringify ( { appname : 'testApp' , port : common . defaultPort , isDeployableContainer : true , applicationType : 'MS' } ) ,
471
+ bluemix : JSON . stringify ( { name : PROJECT_NAME , openApiServers : [ { spec : swagStr } ] } )
472
+ } )
473
+ . toPromise ( ) ; // Get a Promise back when the generator finishes
492
474
} ) ;
493
475
494
476
it ( 'public route' , function ( ) {
@@ -504,11 +486,11 @@ describe('core-node-express:app blank integration test with openApiServices', fu
504
486
let swagger = JSON . parse ( fs . readFileSync ( path . join ( __dirname , '../test/resources/person_dino.json' ) , 'utf8' ) ) ;
505
487
let swagStr = JSON . stringify ( swagger ) ;
506
488
return helpers . run ( path . join ( __dirname , '../app' ) )
507
- . withOptions ( {
508
- spec : JSON . stringify ( { appname : 'testApp' , port : common . defaultPort , isDeployableContainer : true , applicationType : 'BLANK' } ) ,
509
- bluemix : JSON . stringify ( { name : PROJECT_NAME , openApiServers : [ { spec : swagStr } ] } )
510
- } )
511
- . toPromise ( ) ; // Get a Promise back when the generator finishes
489
+ . withOptions ( {
490
+ spec : JSON . stringify ( { appname : 'testApp' , port : common . defaultPort , isDeployableContainer : true , applicationType : 'BLANK' } ) ,
491
+ bluemix : JSON . stringify ( { name : PROJECT_NAME , openApiServers : [ { spec : swagStr } ] } )
492
+ } )
493
+ . toPromise ( ) ; // Get a Promise back when the generator finishes
512
494
} ) ;
513
495
514
496
it ( 'public route' , function ( ) {
0 commit comments