The Terasology Foundation
Update test case for user signup
What you will need to know?
Javascript, Node.js, RESTful APIs, Async Programming, Jest.
Write test case to ensure that the user signup route is functioning right
In this task, you are supposed to update the test case for checking the functionality of the signup route. To start with this you need to make use of jest which is a testing framework for javascript. You can pass dummy data to the function which are required for a user to signup like:
name: 'demo user',
email: 'demouser@demo.com',
password: 'demoUser@123',
about: 'I am a coder',
company: 'XYZ company',
website: 'http://www.google.com',
location: 'Bengaluru'
This test calls the signup API with the dummy data and if the signup is successful the test passes.
Expected Outcome
The test case should only pass for unregistered users.
Resources & References (Where to Start)
- This is most important : Learn to write test case using async await.
- Basic of Jest: Getting started with jest
- If want to see an implementation of a test case in the project - Link
Extras
In case you feel confused or need help you can join our discord channel - Codeuino's Website.
Task tags
Students who completed this task
Torpedo