NestJS 12.6.3 adds testing instrument option and cuts 404 CPU time by ~28%
NestJS 12.6.3 introduces an instrument option to Test.createTestingModule() for provider decoration in tests, makes route conflict detection case‑insensitive, and reduces 404 exception CPU cost by about 28 %.
NestJS 12.6.3 was released on 2026-11-26. The update adds an instrument option to Test.createTestingModule() for provider decoration in tests and reduces the CPU cost of 404 exceptions by about 28 %.
The new instrument option lets developers pass an instrument configuration when building a testing module, which decorates providers similarly to production. Instances resolved through resolve() in an application context are also passed to the instrument instance decorator, including those created by NestFactory.createApplicationContext. This change enables more realistic integration testing without altering production code.
Route conflict detection now treats paths case‑insensitively on both Express and Fastify when caseSensitive is false, causing duplicate routes to abort the bootstrap process. The case‑insensitive check applies only when the framework option caseSensitive is false, preserving existing behavior for case‑sensitive setups. MiddlewareConsumer.exclude() without a version argument now excludes routes of the default version(s). WebSocket gateways whose paths differ only by spelling now share a single server instead of spawning separate ones.
@Body('key') now returns undefined for falsy primitive bodies such as "", 0, or false instead of returning the whole body. ParseDatePipe rejects invalid dates like 2/30, 4/31, and weekday month‑name dates that exceed the month’s end. Security headers reject undefined entries in referrerPolicy.policy as invalid values. These adjustments tighten input validation and align header handling with the specification.
GrpcExceptionFilter logs non‑RpcException errors before responding with an UNKNOWN status. The Fastify httpAdapter.render() method now works on the raw response without throwing a view‑is‑not‑a‑function error, and app.listen(port, host, backlog) correctly forwards the backlog argument after the host. Both Fastify improvements simplify server setup and avoid runtime errors during rendering.