File tree Expand file tree Collapse file tree 1 file changed +12
-10
lines changed Expand file tree Collapse file tree 1 file changed +12
-10
lines changed Original file line number Diff line number Diff line change @@ -183,15 +183,17 @@ async function clearTestData () {
183183/**
184184 * Run the postman tests.
185185 */
186- apiTestLib . runTests ( requests , require . resolve ( './resource-api.postman_collection.json' ) ,
187- require . resolve ( './resource-api.postman_environment.json' ) ) . then ( async ( ) => {
188- logger . info ( 'newman test completed!' )
189- await clearTestData ( )
190- } ) . catch ( async ( err ) => {
191- logger . logFullError ( err )
192-
193- // Only calling the clean up function when it is not validation error.
194- if ( err . name !== 'ValidationError' ) {
186+ clearTestData ( ) . then ( ( ) => {
187+ apiTestLib . runTests ( requests , require . resolve ( './resource-api.postman_collection.json' ) ,
188+ require . resolve ( './resource-api.postman_environment.json' ) ) . then ( async ( ) => {
189+ logger . info ( 'newman test completed!' )
195190 await clearTestData ( )
196- }
191+ } ) . catch ( async ( err ) => {
192+ logger . logFullError ( err )
193+
194+ // Only calling the clean up function when it is not validation error.
195+ if ( err . name !== 'ValidationError' ) {
196+ await clearTestData ( )
197+ }
198+ } )
197199} )
You can’t perform that action at this time.
0 commit comments