CoreHRx Jobs

Apply in one click, save jobs and take free mock tests.

Register free Log in
Hiring? Post jobs with CoreHRx
My account
user

View & update profile

MERN Stack Developer mock test: free online practice

15 to 30 random questions in 15 to 30 minutes, by the level you choose: mongodb, express, react and node.js: apis, auth, security, deployment. After you submit you get your score, your strong and weak topics, and the right answer with an explanation for every question.

Choose your experience

Free with a CoreHRx Jobs account: you will be asked to sign in or create one first.

What does the MERN Stack Developer mock test cover?

The test covers 13 topics across three levels. Each attempt picks 15 to 30 questions at random, by the level you choose, so every attempt is different.

  • Authentication and Sessions
  • Deployment and Configuration
  • MongoDB Queries and Modelling
  • Node.js Runtime
  • Error Handling and Validation
  • Express Routing and Middleware
  • Mongoose
  • Performance and Scaling
  • React Components and Hooks
  • React State and Data Fetching
  • REST API Design
  • Testing
  • Web Security

Sample MERN Stack Developer mock test questions

One question from each level, the way they appear in the test. A new set comes on the 1st of every month. Try it, then open the answer.

  1. FresherAuthentication and Sessions

    What is the main benefit of putting a session token in a cookie with the HttpOnly flag?

    • JavaScript on the page cannot read it, so an XSS script cannot steal it
    • The browser sends it only over HTTPS connections
    • The cookie is never sent to the server, only kept locally
    • The cookie value is encrypted by the browser, so nobody can change its contents
    Show the answer

    Answer: JavaScript on the page cannot read it, so an XSS script cannot steal it. HttpOnly hides the cookie from document.cookie and other page scripts, which protects it from token theft through XSS. Sending only over HTTPS is the job of the Secure flag, and HttpOnly does not encrypt anything.

  2. Intermediate (1-5 years)REST API Design

    The React checkout retries POST /api/payments after a network timeout. How can the API make sure the customer is charged only once?

    • The server rejects any second POST from the same IP address within an hour
    • The client sends an Idempotency-Key header and the server returns the stored result on a repeat
    • The server waits 30 seconds before saving any payment to MongoDB
    • The client switches to GET for the retry, since GET requests are idempotent and are never charged twice
    Show the answer

    Answer: The client sends an Idempotency-Key header and the server returns the stored result on a repeat. A unique key per checkout attempt, stored with a unique index, lets the server spot the retry and replay the first answer instead of charging again. IP blocking breaks honest users, and GET must not create payments.

  3. Experienced (5+ years)Node.js Runtime

    On Node.js 22.12 or later (so also on the 24 and 26 LTS lines), a CommonJS file calls require() on an ES module that has no top-level await. What happens?

    • It loads the module only when the --experimental-modules flag is set
    • It loads the module and returns its namespace object
    • It always throws ERR_REQUIRE_ESM, as in older Node.js versions
    • It returns a promise that resolves to the module's namespace
    Show the answer

    Answer: It loads the module and returns its namespace object. require(esm) is enabled by default from Node.js 22.12 and in every later line, so CommonJS can load synchronous ES modules. A module that uses top-level await still cannot be required and throws ERR_REQUIRE_ASYNC_MODULE; use import() there.

Take the full MERN Stack Developer mock test: 15 to 30 questions and 15 to 30 minutes, by level.

How is the MERN Stack Developer mock test scored?

A question counts as right only when you pick exactly the right option, or all the right options where it says so; a question left blank counts as wrong. Your score is the share of the test's questions you got right (15 to 30, by level). The result also scores every topic, so you know what to revise before the interview.

  • 75% or more in a topica strength
  • 50% to 74%worth a revision
  • Under 50%a topic to work on

MERN Stack Developer mock test: questions people ask

Is the MERN Stack Developer mock test free?

Yes. The MERN Stack Developer mock test is free. You need a free CoreHRx Jobs account to start it, so your score and the topics to work on are saved.

How many questions are in the MERN Stack Developer mock test?

It depends on the level: Fresher has 15 questions in 15 minutes, Intermediate has 20 questions in 20 minutes, Experienced has 30 questions in 30 minutes. They are multiple-choice questions picked at random from a larger bank of MERN Stack Developer questions at your level, so every attempt is different.

Which MERN Stack Developer topics does the test cover?

The questions cover Authentication and Sessions, Deployment and Configuration, MongoDB Queries and Modelling, Node.js Runtime, Error Handling and Validation, Express Routing and Middleware, Mongoose, Performance and Scaling, React Components and Hooks, React State and Data Fetching, REST API Design, Testing, Web Security. Your result shows how you did in each topic.

Which level should I choose?

Fresher if you are a student or have less than a year of experience, Intermediate for 1 to 5 years at work, and Experienced for 5 years or more.

Can employers see my MERN Stack Developer score?

Only your best MERN Stack Developer score, and only when it is 60% or more. It shows on the job applications you send on CoreHRx. Lower scores stay private.

Can I take the MERN Stack Developer mock test again?

Yes, up to 10 tests a day. Each attempt picks questions you have not seen recently first.

All mock tests