I
I
Igor Shumilovsky2016-12-28 15:18:45
React
Igor Shumilovsky, 2016-12-28 15:18:45

How to test functions that are under lodash.debounce in Jest?

There is a component that has a method

constructor() {
  super();
  this.onChange = _.debounce(this.onChange, 300);
}

onChange() {
   this.props.callback();
}

How to test onChange call in Jest? (In reality, the method is more complicated)

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question