score:1

Accepted answer
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