Skip to content

Unit testing http #47

Description

@cliffeby

When I replace the search method with a simple getAll method e.g.
getUsers(term:string) { let apiURL = ${this.apiRoot}?term=${term}&media=music&limit=20; return this.http.get<[]>(this.apiURL);

and call
getUsers('U2')

the test fails with no matching url.

Other similar code on the web will pass, but then the test expect(service.results.length).toBe(1+X);
will not fail.

Any ideas appreciated.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions