Update Calendar Tests

Let's update dashboard tests to add the tests for the calendar functionalities.

Below is our updated code. Use this to make further changes mentioned in the lesson.

Please provide values for the following:
your_API_key
Not Specified...
<!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 dashboard calendar

Let’s update our tests now that our events are populated within the calendar.

  1. Add two spies for our new addJSDate and addEventColors methods, chaining them with .callThrough() to allow the implementation to run.
Press + to interact
// src/app/dashboard/dashboard.component.spec.ts
beforeEach(() => {
fixture = TestBed.createComponent(DashboardComponent);
component = fixture.componentInstance;
authService = fixture.debugElement.injector.get(AuthService);
eventsService = fixture.debugElement.injector.get(EventsService);
spyOn(component, 'addJSDate').and.callThrough();
spyOn(component, 'addEventColors').and.callThrough();
fixture.detectChanges();
});
  1. Now update our initialization test. Leverage our two spies to verify that the functions have been called when a collection of users have been
...