Browse Source

fix(testing): More graceful shutdown

Michael Bromley 2 years ago
parent
commit
aa91bd0610
1 changed files with 1 additions and 1 deletions
  1. 1 1
      packages/testing/src/test-server.ts

+ 1 - 1
packages/testing/src/test-server.ts

@@ -61,7 +61,7 @@ export class TestServer {
     async destroy() {
         // allow a grace period of any outstanding async tasks to complete
         await new Promise(resolve => global.setTimeout(resolve, 500));
-        await this.app.close();
+        await this.app?.close();
     }
 
     private getCallerFilename(depth: number): string {