Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unit testing http #47

Open
cliffeby opened this issue Jul 31, 2019 · 0 comments
Open

Unit testing http #47

cliffeby opened this issue Jul 31, 2019 · 0 comments

Comments

@cliffeby
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant