In this assignment we will test your knowledge in express and EJS, while also testing your capabalities to debug existing code and apply fixes to it to make tests work.
git clone https://github.com/Viewpoint-Programming-Class/basic-route-tests
cd basic-route-tests
After downloading this repository, run the following 2 commands from the root of the repository
- npm install
- npm test
In its initial state all 6 tests will fail as shown in this image
The tests assert that
- There's an index.html file in the static directory
- There's a script.js file in the static directory
- There's a style.css file in the static directory
- The logic post request gets handled properly
- There's an EJS template that renders HTML
- The EJS template renders a name that is bound to the query's name
Upload an image to the classroom with all the tests passsing, see below
The tests are not to be modified, only the code, fix the code to make the tests pass not the other way around
In order to ensure that you understood what is expected from you and used the correct technics to get the tests to pass, please provide a detailed explanation of the steps you used to get each test to work.
- 50 percent of your grade is the successful submission of a screenshot and details about your process.
- 10 points for each passing test (meaning that even if you only get one passing test, you'll have a passing grade)
Look for mistakes in the code to see if there are any easy solutions to failing tests, some of the tests are simply testing your ability to detect small mistakes in the program. However, for one of the tests, you will have to implement a missing route and all the logic for it.