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. FresherMongoDB Queries and Modelling

    In a MERN app, how does MongoDB store one customer record?

    • As a BSON document inside a collection
    • As a key in an in-memory cache that is cleared on restart
    • As a row inside a table with a fixed set of columns
    • As one JSON string inside a single text column
    Show the answer

    Answer: As a BSON document inside a collection. MongoDB is a document database: each record is a BSON (binary JSON) document, and related documents sit in a collection. There is no fixed table schema, which is why tables with fixed columns describe SQL databases, not MongoDB.

  2. Intermediate (1-5 years)Authentication and Sessions

    What is the main risk of keeping the JWT in localStorage in a React app?

    • localStorage is sent to every website, so other sites can read the token
    • Tokens in localStorage are sent with every request, which enables CSRF
    • Any script that runs on the page through XSS can read it and send it away
    • localStorage is cleared on every reload, so the user is logged out often
    Show the answer

    Answer: Any script that runs on the page through XSS can read it and send it away. localStorage is readable by all JavaScript on the origin, so one XSS bug leaks the token. It is not shared with other sites and is not sent automatically, so it does not cause CSRF; HttpOnly cookies swap the XSS theft risk for CSRF concerns.

  3. Experienced (5+ years)Deployment and Configuration

    The React app is deployed under the path /shop/ instead of the domain root, and its JS files return 404. What should change in a Vite project?

    • Set NODE_ENV to shop, so that Vite adds the prefix
    • Rename index.html to shop.html before the deploy runs
    • Move the dist folder to /shop on the server without changes
    • Set base: '/shop/' in vite.config and the router's basename
    Show the answer

    Answer: Set base: '/shop/' in vite.config and the router's basename. Vite writes asset URLs from the base option, which defaults to /, so the HTML points to /assets/... at the root. Setting base to /shop/ fixes the asset paths, and React Router needs basename='/shop' so routes match.

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