- Replace maxBufferSize parameter with JsonSocketOptions object
- Add JsonSocketOptions interface for better extensibility
- Update ClientTCP and ServerTCP to pass options object
- Update all tests to use new options format
Addresses review feedback from @kamilmysliwiec
- Use valid JSON strings in test data
- Account for packet header length in buffer size calculations
- Fix chunked data test to properly accumulate buffer
- Add maxBufferSize option to TcpOptions and TcpClientOptions interfaces
- Modify JsonSocket to accept maxBufferSize as constructor parameter
- Update ClientTCP and ServerTCP to pass maxBufferSize to JsonSocket
- Add comprehensive tests for maxBufferSize functionality
- Maintain backward compatibility with default value (128MB in characters)
Closes#16256
Add comprehensive unit tests for ClassSerializerInterceptor which
previously had no test coverage despite being a public API.
Test coverage includes:
- constructor with custom transformer package injection
- intercept() with RxJS pipe and context options merging
- serialize() for arrays, objects, and StreamableFile handling
- transformToPlain() with type conversion and instanceOf checks
- getContextOptions() with metadata precedence (handler > class)
- Edge cases: null/undefined, mixed arrays, Date objects, primitives
Total: 25+ test cases covering all public methods and edge cases.
Add comprehensive unit tests for DiscoveryService which previously
had no test coverage despite being a public API.
Test coverage includes:
- createDecorator() static method with unique key generation
- getProviders() with metadataKey and include options filtering
- getControllers() with module-based filtering
- getMetadataByDecorator() with method and class metadata
- getModules() protected method with include filtering
- Edge cases: empty modules, undefined instances, null checks
Total: 30+ test cases covering all public methods and edge cases.
Skip constructor deletion for Date, RegExp, Error, Map, Set, WeakMap, and WeakSet to fix Jest useFakeTimers compatibility. Maintains prototype pollution protection for regular objects.
Fixes#16195
Skip constructor deletion for Date, RegExp, Error, Map, Set, WeakMap, and WeakSet to fix Jest useFakeTimers compatibility. Maintains prototype pollution protection for regular objects.
Fixes#16195
When forwardRef provider fails to load in a non-static context
(REQUEST/TRANSIENT scope, the error was silently swallowed because the
promise was fire-and-forget without catch handler
This fix add catch handler that propagate the error through
ettlementSignal, ensuring proper error handling and preventing unhandled
promise rejection