title: Spec has no expectations when unit testing a Service in Angular
body: <p>So my tests are passing but it's this one unit test named <code>should get the notes</code> for the <code>NoteService</code> which, when <code>ng test</code> is ran, its name in Karma is written like</p>
  <blockquote>
  <p>SPEC HAS NO EXPECTATIONS should get the notes</p>
  </blockquote>
  <p>The method that I am trying to test is the following:</p>
  <pre><code>@Injectable()
  export class NoteService {
  
    readonly baseUrl = &quot;https://localhost:4200&quot;;
    readonly httpOptions = {
      headers: new HttpHeaders({
        'Content-Type': 'application/json',
      })
    };
  
    constructor(private httpClient: HttpClient) { }
   
    getNotes(): Observable&lt;Note[]&gt; {
      return this.httpClient.get&lt;Note[]&gt;(this.baseUrl + `/notes`, this.httpOptions);
    }
  </code></pre>
  <p>And the unit test is this:</p>
  <pre><code>describe('NoteService', () =&gt; {
    let service: NoteService;
    
    const mockList = [
      {
        &quot;id&quot;: &quot;id1&quot;,
        &quot;title&quot;: &quot;First note&quot;,
        &quot;description&quot;: &quot;This is the description for the first note&quot;,
        &quot;categoryId&quot;: &quot;1&quot;
      },
      {
        &quot;id&quot;: &quot;id2&quot;,
        &quot;title&quot;: &quot;Second note&quot;,
        &quot;description&quot;: &quot;This is the description for the first note&quot;,
        &quot;categoryId&quot;: &quot;2&quot;
      }]
  
  beforeEach(() =&gt; {
      TestBed.configureTestingModule({imports: [HttpClientTestingModule], 
        providers: [NoteService]});
      service = TestBed.inject(NoteService);
    });
  
    it('should be created', () =&gt; {
      expect(service).toBeTruthy();
    });
  
    it('should get the notes', fakeAsync(() =&gt; {
      service.getNotes().subscribe((val) =&gt; {
        expect(val).toBe(mockList);
      });
    }));
  });
  </code></pre>
  <p>Therefore, why is it saying that &quot;SPEC HAS NO EXPECTATIONS&quot;? Is it something wrong with my unit test? And how should I tweak it in order to make it work well?</p>