Hey there, I was working on a test for a call where I am using to emit the event:
onChange(eventName: MatRadioChange): void {
this.eventName.emit(eventName.value);
}
Here is the test I have written for it:
describe('onChange', (eventName: MatRadioChange) => {
it('should emit true to open calendar modal for mobile view', () => {
spyOn(component.eventName, 'emit');
component.onChange(eventName.value);
expect(component.eventName.emit).toHaveBeenCalled();
});
});
But I keep encountering this error:
Argument of type '(changeEvent: MatRadioChange) => void' is not assignable to parameter of type '() => void'.
describe('onChange', (changeEvent: MatRadioChange) => {
Any assistance with this issue would be highly appreciated!