Response {
size: 0,
timeout: 0,
cookies: [Getter],
[Symbol(Body internals)]: {
body: PassThrough {
_readableState: [ReadableState],
_events: [Object: null prototype],
_eventsCount: 2,
_maxListeners: undefined,
_writableState: [WritableState],
allowHalfOpen: true,
[Symbol(kCapture)]: false,
[Symbol(kCallback)]: null
},
disturbed: false,
error: null
},
[Symbol(Response internals)]: {
url: 'http://localhost:53325/',
status: 204,
statusText: 'No Content',
headers: Headers { [Symbol(map)]: [Object: null prototype] },
counter: 0
}
}
The problem
When running a unit test using Jest the validation pipeline is not triggered. The expected behaviour would be by providing incorrect values to a route which accepts a body that the validation pipe would be triggered and an error returned to the client.
The unit test can be found here:
Additional context
Package versions:
"class-transformer": "0.5.1","class-validator": "0.14.0","next-api-decorators": "2.0.2",