All Questions
Tagged with jasmine2.0 karma-coverage
4 questions
0
votes
0
answers
329
views
How to pass a token for jasmine requests
I implemented my tests in an application without authentication, but when it was implemented my tests stopped working.
I have an API to generate a token, how can I put this token in my services inside ...
0
votes
1
answer
3k
views
How can i test a function that return a promise or reject - Jasmine and Karma
I need to cover 100% of the tests of a function, it returns a return new Promise<boolean>((resolve, reject) this is the full function.
saveData(): Promise < boolean > {
return new ...
0
votes
1
answer
551
views
How can i coverage a promise response with Jasmine and Karma
I have a function that returns and treats a promise, I need to cover the return that is inside then but I don't know how I can do this, I'm currently trying as follows:
confirmRemoveUser(user: ...
0
votes
1
answer
806
views
How to cover all lines of a function with jasmine-karma
How can I cover all lines of the function below using jasmine?
addUser(): void {
if (this.validateNewUser()) {
this.newUser._Job = this.selectedJob;
this.newUser.PositionId = ...