I need to test this, but I’m new testing and I do not have idea, I’m working with angular, I just want to test the close function and maybe if it renders. This is the html. And this is the modal.component.ts Answer In order to test if EventEmitter emits an event when clicking on background div, you should write a
Tag: karma-jasmine
How to unit test a mapbox popup with jasmine testing?
I have a mapbox popup. I am using jasmine and I want to write a unit test for it. So I have this function: and this is the template: and this is my unit test: But I get this error: So what I have to change? Thank you Answer I dont think you should be testing like that. To test
jasmine partial string matching
I love the partial object matching that jasmine.objectContaining provides: Is there a jasmine equivalent for strings? something along the lines of: I’d like to look at a specific argument without resorting to assertions off mySpy.calls: Answer There isn’t anything of this sort in Jasmine. But you can leverage the ability of creating a custom matcher in Jasmine for this. Here’s