All Questions
9 questions
0
votes
1
answer
21
views
fControl.get is not a function in angular unit test
Trying to write an unit test for changeFunctionalityStatus(). facing the issue like fControl.get is not a function .
Stuck with this Anyone pls help me why this issue coming. TIA
...
0
votes
1
answer
35
views
How to write unit test case using Jamine to test form controls touched, untouched and dirty conditions
I have a form built using reactive forms angular and I have the below code.
The entire if conditions says , branch not covered, how can i make sure the branch is covered.
this.tableOptions.rowData....
0
votes
0
answers
366
views
How to mock blob response from API in Angular test case
In my angular application, I have a REST API call which returns me a Blob data which is eventually opened in a new tab.
I am trying to create a mock Blob object in my jasmine testcase and spyon the ...
1
vote
0
answers
532
views
Unhandled promise rejection: Timeout thrown
I am working on unit test case in angular 12 and i discover this random behaviour of test case where i found that some times my test cases are working normally and some times it throwing this error &...
0
votes
0
answers
760
views
Test case writing for If Else statement
I am writing test case for the conditional if=else statement in angular , test case is not having any error, but when I run the ng test then in code coverage its showing if-else statement is not ...
0
votes
1
answer
205
views
Angular 7 test case throwing broadcaster error
while running test cases it throws this error.
Almost added all required components and services and other dependencies though it is throwing error while running test-cases in Angular &
Error: ...
0
votes
1
answer
2k
views
Angular 5 - Jasmine / Karma Test Case: Button Enable / Disable by input validation
I am still new to Angular and its testing frameworks, Jasmine and Karma.
I’m stuck on testing a button to make sure that when the user enters the correct information, it is always enabled; mainly ...
1
vote
1
answer
529
views
How to write the test case in Jasmine in Angular2 for redirect URL?
SecurityService.prototype.Feedback = function () {
window.open('https://www.google.com/', '_blank');
I need to write the test case for above code in Jasmine in Angular 2.
0
votes
1
answer
33
views
Unable to cover or conditioned line in test case
I am one function where I am returning values like this...
GetData(){
let parsedData= JSON.parse(data.data.json);
return {
x: parsedData.x|| [],
y: parsedData.y|| []
...