Guest User

Untitled

a guest
Dec 13th, 2018
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.54 KB | None | 0 0
  1. 1. What are smoke tests?
  2. Smoke tests are simple tests that make sure the component will run in production.
  3. 2. When would you choose to use shallow and full-DOM rendering?
  4. You would use shallow rendering for testing the parent component. No child components are tested.
  5. You would use full DOM rendering when you want to test both the parent and child components.
  6. 3. Imagine you could only test one of your actions, or your reducers. Which would you choose and why?
  7. I would test my authentication action and reducer.
  8. 4. What does the exact prop of the Route component do?
  9. The exact prop only goes to that exact route, and not any child routes
  10. 5. Explain this syntax in the context of an async action: const actionName = () => dispatch => {
  11. Returns a callback function.
  12. 6. What conditions should you check to make sure that a user is providing valid registration information?
  13. If the username is already used, if the passwords match, if the password length is long enough, if the required fields are
  14. filled.
  15. Which of these can be checked on the frontend?
  16. If the passwords match, if the password length is long enough, if the required fields are
  17. filled.
  18. 7. Which header do you need to set to provide a JWT token as credentials to an endpoint?
  19. Authorization
  20. What should the header value look like.
  21. Authorization: `Bearer ${authToken}`
  22. 8. What is the purpose of refreshing a JWT, and when do we do it?
  23. A JWT token is only good for a certain amount of time. Refreshing a JWT every once in a while while a user is logged in keeps
  24. it from logging the user out while they are in the app.
Add Comment
Please, Sign In to add comment