score:0

the method you want to call resides inside the instance of the wrapper. that means you need to call it like this:

wrapper.instance().nextpage();

setup your test file like this:

import react from "react";
import { mount } from 'enzyme';

describe('testing component',() => {
  let wrapper = mount(<invoice  store = {store} />)

  test('testing nextpage method', ()=>{
    wrapper.instance().nextpage();
    expect(wrapper.state('currentpage')).toequal('the value you want here');
  });
});

hope this helps!


Related Query

More Query from same tag