Angular Jest mock post request
First time using jest and I’m having some big problems on mocking a service with a post method request. I think I spend more than 6 hours on this and still can’t pass it.
I would appreaciate any help.
First I’ll say about libraries versions. As ChatGpt told, those should be compatible with each other. jest: 29.7.0, jest-preset-angular: 14.4.2, ts-jest: 29.2.5, ts-node: 10.9.2, typescript: 5.5.2, angular/cli: 18.2.11, angular/core: 18.2.0.
Method which I want to test is this one, from Registration component:
Angular Jest mock post request
First time using jest and I’m having some big problems on mocking a service with a post method request. I think I spend more than 6 hours on this and still can’t pass it.
I would appreaciate any help.
First I’ll say about libraries versions. As ChatGpt told, those should be compatible with each other. jest: 29.7.0, jest-preset-angular: 14.4.2, ts-jest: 29.2.5, ts-node: 10.9.2, typescript: 5.5.2, angular/cli: 18.2.11, angular/core: 18.2.0.
Method which I want to test is this one, from Registration component: