@jaypie/testkit 1.0.23 → 1.0.25

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jaypie/testkit",
3
- "version": "1.0.23",
3
+ "version": "1.0.25",
4
4
  "author": "Finlayson Studio",
5
5
  "type": "module",
6
6
  "exports": {
@@ -188,13 +188,12 @@ export const expressHandler = vi.fn((handler, props = {}) => {
188
188
  }
189
189
  }
190
190
  const jaypieFunction = jaypieHandler(handler, props);
191
- return async (req, res = {}, ...extra) => {
192
- // For mocking, let's make sure res json, send, and status are functions
191
+ return async (req = {}, res = {}, ...extra) => {
193
192
  const status = HTTP.CODE.OK;
194
193
  if (res && typeof res.status === "function") {
195
194
  res.status(200);
196
195
  }
197
- const response = jaypieFunction(req, res, ...extra);
196
+ const response = await jaypieFunction(req, res, ...extra);
198
197
  if (response) {
199
198
  if (typeof response === "object") {
200
199
  if (typeof response.json === "function") {