JavaScript: QUnit

QUnit is a JavaScriptJavaScript JavaScript or JS is an object-oriented computer programming language commonly used to create interactive effects within web browsers. WordPress makes extensive use of JS for a better user experience. While PHP is executed on the server, JS executes within a user’s browser. unit testing framework.



1. Set up your install. Follow one of the guides to setup your local installLocal Install A local install of WordPress is a way to create a staging environment by installing a LAMP or LEMP stack on your local computer.

2. Install WordPress via SVNSVN Subversion, the popular version control system (VCS) by the Apache project, used by WordPress to manage changes to its codebase. Install WordPress via SVN or GitGit Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency. Git is easy to learn and has a tiny footprint with lightning fast performance. Most modern plugin and theme development is being done with this version control system.

Top ↑

Running the QUnit Test Suite

From your now installed and configured WordPress testing installation navigate to /tests/qunit/index.html.

If your locally setup domain is then is the URLURL A specific web address of a website or web page on the Internet, such as a website’s URL you want.

You can also run the tests directly in the browser without setting up a web server, append /tests/qunit/index.html to the the file path of your repo check out, for example file:///Users/myusername/dev/

Last updated: