What is the role of a Repository in TypeORM?
To manage database migrations
To handle user authentication
To define database tables
To provide methods for interacting with a specific entity
Which of the following is NOT a built-in Pipe provided by NestJS?
DefaultValuePipe
ParseIntPipe
ValidationPipe
TransformationPipe
Which decorator type in NestJS is specifically designed to intercept and modify method arguments?
Property Decorator
Method Decorator
Class Decorator
Parameter Decorator
Which of the following is the primary advantage of using TypeORM in a NestJS application?
Simplified database interactions through an Object-Relational Mapper (ORM)
Direct manipulation of the database using SQL queries
Handling HTTP requests and responses
Automatic generation of frontend UI components
What is the primary purpose of using Passport.js in a NestJS application?
Handling file uploads
Creating RESTful API endpoints
Managing database connections
Simplifying authentication and authorization logic
What is the purpose of the 'ParseIntPipe' in NestJS?
To transform a numeric string into an integer.
To validate the data type of an input parameter.
To parse an object into a JSON string.
To convert a string value to a Boolean.
Can you have both global and custom HTTP exception filters in a NestJS application?
Yes, but you need to explicitly specify the order in which they should be executed.
No, global exception filters take precedence and override any custom filters.
No, NestJS only allows you to define either global or custom exception filters, not both.
Yes, but custom filters will only handle exceptions not caught by global filters.
What is the recommended approach to unit test a custom Guard in NestJS?
By relying solely on console logs within the Guard's code to verify its behavior.
By setting up a complete end-to-end testing environment that interacts with real databases and services.
By mocking external dependencies like database calls or HTTP requests, focusing on testing the Guard's logic in isolation.
By manually triggering API requests using tools like Postman and observing the responses.
What is a common use case for a class decorator in NestJS?
Modifying the response sent back to the client.
Adding common properties or methods to all instances of a class.
Defining custom route paths for controller methods.
Validating the structure of request payloads.
What is the purpose of the @nestjs/testing package in NestJS?
@nestjs/testing
Provides utilities and helpers specifically designed for testing NestJS applications
Offers tools for performance profiling and optimization of NestJS code
Facilitates the deployment of NestJS applications to various cloud platforms
Enables integration with external continuous integration and delivery (CI/CD) pipelines