@jaypie/express 1.2.4-rc17 → 1.2.4-rc19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1538,6 +1538,8 @@ function safeSendJson(res, statusCode, data) {
1538
1538
  if (res._resolve) {
1539
1539
  res._resolve(res.buildResult());
1540
1540
  }
1541
+ // Emit "finish" event so runExpressApp's promise resolves
1542
+ res.emit("finish");
1541
1543
  return;
1542
1544
  }
1543
1545
  // Fall back to standard Express methods for real responses
@@ -1561,6 +1563,8 @@ function safeSend(res, statusCode, body) {
1561
1563
  if (res._resolve) {
1562
1564
  res._resolve(res.buildResult());
1563
1565
  }
1566
+ // Emit "finish" event so runExpressApp's promise resolves
1567
+ res.emit("finish");
1564
1568
  return;
1565
1569
  }
1566
1570
  // Fall back to standard Express methods for real responses