Which decorator is used to apply a custom Pipe to a specific parameter in a NestJS controller?
@UsePipes()
@Transform()
@Pipe()
@Injectable()
What object in the intercept() method of a transformation interceptor allows you to modify the response stream?
intercept()
context.getRequest()
context.switchToHttp().getResponse()
context.switchToWs().getClient()
context.getNext()
Which testing type provides the most comprehensive coverage by simulating real user interactions with a running NestJS application?
Regression Testing
Integration Testing
Unit Testing
End-to-End (E2E) Testing
Which of the following is the primary advantage of using TypeORM in a NestJS application?
Handling HTTP requests and responses
Automatic generation of frontend UI components
Simplified database interactions through an Object-Relational Mapper (ORM)
Direct manipulation of the database using SQL queries
What is the primary advantage of using Mongoose with NestJS for database integration?
Mongoose enables direct execution of SQL queries on MongoDB
Mongoose automatically generates frontend UI components
Mongoose provides a schema-based solution for modeling data in MongoDB
Mongoose is used for managing relational databases in NestJS
How can you access the currently authenticated user's information within a NestJS controller after successful authentication?
By querying the database directly within the controller
By using the 'AuthService'
By injecting the 'Request' object
By accessing the 'user' property of the 'req' object within the controller method
What is the primary security concern associated with storing session data in cookies?
Denial-of-service (DoS) attacks
Cross-site scripting (XSS) attacks
Cross-site request forgery (CSRF) attacks
Database injection attacks
What is the primary purpose of using Passport.js in a NestJS application?
Handling file uploads
Simplifying authentication and authorization logic
Creating RESTful API endpoints
Managing database connections
In NestJS, which decorator is used to define a microservice?
@Controller()
@Microservice()
@Module()
In the context of NestJS testing, what are 'mocks' primarily used for?
Generating code coverage reports
Automating user interactions with the application's UI
Measuring the performance of specific code segments
Replacing external dependencies with controlled implementations