My Code:
$('#test1').val('string1');
I'm able to test if val has been called with 'string1'.
spyOn($.fn, 'val');
expect($.fn.val).toHaveBeenCalledWith('string1');
But I want to test if $ has been called with a specific selector. I want to be able to do this.
expect($.fn).toHaveBeenCalledWith('#test1');