UNPKG

@unito/integration-sdk

Version:

Integration SDK

15 lines (12 loc) 454 B
import express from 'express'; import assert from 'node:assert/strict'; import { describe, it } from 'node:test'; import start from '../../src/middlewares/start.js'; describe('start middleware', () => { it('adds request start time to locals', () => { const request = {} as express.Request; const response = { locals: {} } as express.Response; start(request, response, () => {}); assert.ok(response.locals.requestStartTime); }); });