Back to programming Quizzes

NestJS Quiz ( Intermediate )

This intermediate NestJS quiz is designed for developers who know the basics and want to test real-world usage of NestJS. It covers dependency injection scopes, modules communication, guards, interceptors, pipes, middleware flow, validation, authentication basics, and common interview scenarios.

15
Questions
~10
Minutes
10
Min Limit

Try a few sample questions

The question bank contains 46 questions. Your scored round uses up to 15 different questions. These samples are excluded from your round; try each one before opening its answer and explanation.

1. What is the main responsibility of AppModule in NestJS?

  1. Handle routing
  2. Bootstrap the application
  3. Group feature modules
  4. Configure middleware
Reveal sample answer and explanation

Answer: Group feature modules

AppModule groups and imports all feature modules.

2. How does NestJS resolve dependencies by default?

  1. Factory pattern
  2. Singleton instances
  3. Prototype instances
  4. Manual injection
Reveal sample answer and explanation

Answer: Singleton instances

NestJS providers are singleton by default.

3. Which provider scope creates a new instance per request?

  1. DEFAULT
  2. STATIC
  3. REQUEST
  4. TRANSIENT
Reveal sample answer and explanation

Answer: REQUEST

REQUEST scope creates a provider per request.