Which testing approach in NestJS focuses on verifying the smallest isolated units of code, like individual functions or methods?
Integration Testing
Unit Testing
End-to-End Testing
System Testing
What is the role of the catch() method in a custom HTTP exception filter?
catch()
It re-throws the exception to be handled by a global exception filter.
It handles the exception and sends a customized error response.
It logs the exception to the console.
It determines the appropriate HTTP status code for the exception.
In a NestJS microservice architecture, how do services typically communicate with each other asynchronously?
Direct method calls
Shared memory
Database triggers
Message queues
Which NestJS module is essential for working with event emitters and listeners?
@nestjs/event-emitter
@nestjs/platform-express
@nestjs/common
@nestjs/core
How can you apply a transformation interceptor to a specific method in a controller in NestJS?
By extending the BaseController class and applying the interceptor in the constructor
BaseController
By using the @Transform() decorator above the controller class
@Transform()
By using the @UseInterceptors() decorator at the method level
@UseInterceptors()
By registering the interceptor globally in the app.module.ts file
app.module.ts
What is the correct way to apply multiple decorators to a single target in NestJS?
By placing the decorator names within square brackets [] above the target.
[]
By passing multiple decorator functions as arguments to the target.
By chaining the decorator functions together using the . operator.
.
By using the @ApplyDecorators function provided by NestJS.
@ApplyDecorators
In NestJS, which decorator is used to define a microservice?
@Injectable()
@Controller()
@Microservice()
@Module()
What is the role of the @SetMetadata decorator in NestJS?
@SetMetadata
It defines a custom decorator factory.
It attaches metadata to a class or method.
It applies middleware to a specific route handler.
It validates the data type of a method parameter.
Which of the following transport mechanisms is well-suited for building highly scalable and real-time NestJS microservices?
HTTP
File system
Email
Redis
What is a common tool or library used for End-to-End (E2E) testing in a NestJS project?
Supertest
Sinon
Istanbul
Enzyme