score:1

Accepted answer

here is the working test case, this might help you further:

https://codesandbox.io/s/xr9295ov3q

import react from "react";
import { shallow } from "enzyme";
import productlist from "./productlist";

    describe("productlist components", () => {
      it("should update correct productlist state", () => {
        let wrapper = shallow(<productlist />);

        wrapper.instance().clearappliedfilters();

        expect(wrapper.state().appliedfilterlist.access.length).tobe(0);
        expect(wrapper.state().appliedfilterlist.bandwidth.length).tobe(0);
        expect(wrapper.state().appliedfilterlist.term.length).tobe(0);
      });
    });

Related Query

More Query from same tag