Summary

We started from plain JavaScript and continued all the way to asynchronous testing and debugging.

Congrats

The hardest part of your testing journey, the beginning, is behind you now! Congratulations, and thanks for sharing that with us. It’s been a great ride:

  • We started with the bare minimum—just JavaScript and no tools!
  • We separated the test cases and leveraged Jasmine to run them for us.
  • We saw how to test functions that return and functions that throw.
  • We mocked the dependencies for functions that have them.
  • We tested functions that depend on the browser APIs and functions that rely on dates.
  • We looked into the Jasmine hooks. We also learned how to set up and tear down test dependencies and keep the test cases isolated and independent.
  • We tackled the testing of classes, both on the server (Node.js) and browser side.
  • We tapped into the secrets of asynchronous testing.
  • We learned how to debug JavaScript on the server and browser side.

We did this all with hands-on coding to help retain the knowledge.

Questions or comments?

Reach out at the Educative Discuss forum. The author or some helpful community member will be there to help

Thank you

Thanks, and good luck on the rest of your testing journey. If it’s anything like mine, it’ll take you to many revelations about your own code and the wonderful place of knowing what is going on with the code!

Get hands-on with 1200+ tech skills courses.