I have an input with ng-model-options="{debounce:250}"
and let's say that I have an ng change on an element and a spy on this function. Now, if I do a simple input test, for example:
it('test', function(){
input.val('hello');
expect(ngChangeSpy).toHaveBeenCalledWith('hello');
})
obviously this does not work. I saw that you can wait for promises to be resolved and such, but here I just want to wait 250 milliseconds for the model to change. Is there any way to achieve this?
source
share