Auto Quiz

Author: Darin
Liscence: MIT

This is Javascript quiz template with automatic grading tests!

Built for use at Bay valley Tech Code Academy

Taking the quiz

  • Open the quiz.js file
  • Write functions to return the correct answer
  • Use console.logs to debug your code
  • Run node quiz.js to run your code

Add console.logs for debugging while taking the quiz

Self Grading

When your are ready to test your code run:

npm install
npm run test

If: it returns all green, good job!
Else: try again till your code is right


Editing the quiz

Make your own quiz by using this Repo as a template

Editing Installation

  npm install
  npm run init
  • Edit the questions/functions in quiz_src/quiz.js
  • Write the correct functions (the answers)
  • Make sure to leave the function definition and export
  • Also leave the // start and // end in the code
  • Write grading tests in quiz_src/quiz.test.js

To test your answer code, run npm run test-src

When ready, build the quiz with npm run build

Now have students clone the repo you made and they can take the quiz!


https://regexr.com/