94 CHAPTER 3 Getting started with JavaScript
FIGURE 3-6 he QUnit summary screen showing a failed testT
Save all files by navigating to File and choosing Save All (or Ctrl+Shift+S) and then run the
application again. If you see the same error, try pressing Ctrl+F5 in the browser window to
clear the browser cache. You should see that the test now passes because greeting is defined
and initialized to Hello World. In the QUnit summary screen, you should see a message that
states 1 Tests Of 1 Passed, 0 Failed. If you click the test, you should see the test showing a
green indicator, as shown in Figure 3-7.
As you add more features to your application, just add another test that defines or helps
shape each feature, and then write the code to make the test pass.