How it works...

If you want to test your application, you need to run the following command:

    npm test

If your test is correct, you should see this result:

The PASS label means that all of your tests in that file passed successfully; if you failed at least one test, you would see the FAIL label. Let's modify our "should has .Home class test. I'm going to change the value to "Home2" to force the fail:

As you can see, now we got the FAIL label and specified with an X the failed test. Also, the Expected and Received values provide useful information, with these, we can see which value is expected and which value is being received.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset