Adding Tests for Signup Component

Let's add tests for the signup component.

We'll cover the following...

We have one task remaining before we finish this chapter. We’ve already written the tests for our AuthService, but now we need to write the tests for SignupComponent.

This is our updated application code:

<!doctype html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <title>LetsGetLunch</title>
  <base href="/">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="icon" type="image/x-icon" href="favicon.ico">
</head>
<body>
  <app-root></app-root>
</body>
</html>
Updated signup feature

Tests for SignupComponent

Remove the f from fdescribe in file auth.service.spec.ts, changing it back to describe so that the AuthService isn’t the only test being run. Click on the “run” button of the widget above to run the tests. At this point, the test for SignupComponent is failing. A lot of text may be logged whenever a test is failing. Thankfully, Karma highlights the location of our failing test in red, so you ...