Skip to content

Unit testing http #47

@cliffeby

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions