Testing JavaScript in WordPress Themes and Plugins

K.Adam is a WordPress expert who knows his stuff when it comes to writing and running unit tests in WordPress. He will kick it up a notch for JavaScript, specifically testing JavaScript in your WordPress themes and plugins.

“What is a unit test,” I hear you ask? A unit test is a way for programmers to validate that the code they’ve written is serving its intended purpose and producing the expected results. There are many ways to test code, and this way happens to be a very, very good one.

Topics Covered

  • How to write a JavaScript Unit Test
  • How to run a JavaScript Unit Test
  • What does testable JavaScript look like?
  • Unit Testing for jQuery – Can it be done? If so, how?
  • And more!