This repository was archived by the owner on May 15, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -416,6 +416,7 @@ function testGen(swagger, config) {
416416 var filename ;
417417 var schemaTemp ;
418418 var environment ;
419+ var ndx = 0 ;
419420
420421
421422 source = read ( join ( __dirname , 'templates/schema.handlebars' ) , 'utf8' ) ;
@@ -429,7 +430,7 @@ function testGen(swagger, config) {
429430 len = config . maxLen ;
430431 }
431432
432- if ( config . pathName . length === 0 ) {
433+ if ( ! targets || targets . length === 0 ) {
433434 // builds tests for all paths in API
434435 _ . forEach ( paths , function ( path , pathName ) {
435436 result . push ( testGenPath ( swagger , pathName , config ) ) ;
@@ -442,7 +443,7 @@ function testGen(swagger, config) {
442443 }
443444
444445 // no specified paths to build, so build all of them
445- if ( config . pathName . length === 0 ) {
446+ if ( ! targets || targets . length === 0 ) {
446447 _ . forEach ( result , function ( results ) {
447448 output . push ( {
448449 name : '-test.js' ,
@@ -475,7 +476,7 @@ function testGen(swagger, config) {
475476 }
476477 output . push ( {
477478 name : filename ,
478- test : target
479+ test : result [ ndx ++ ]
479480 } ) ;
480481 } ) ;
481482 }
Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ var read = require('fs').readFileSync;
3636rules = yaml . safeLoad ( read ( join ( __dirname , '/../../.eslintrc' ) , 'utf8' ) ) ;
3737rules . env = { mocha : true } ;
3838
39- describe ( 'security swagger' , function ( ) {
39+ describe ( 'deprecated swagger' , function ( ) {
4040 describe ( 'assert-option' , function ( ) {
4141 describe ( 'expect' , function ( ) {
4242 var output1 = testGen ( swagger , {
You can’t perform that action at this time.
0 commit comments