import * as React from "react"; import { SearchkitManager, LoadingComponent } from "../../../" import {mount} from "enzyme"; describe("SearchkitProvider", ()=> { beforeEach(()=> { this.searchkit = SearchkitManager.mock() this.wrapper = mount(

loading...

) }) it("display nothing when not loading", ()=> { expect(this.wrapper.html()).toBe("
") }) it("display children when loading", ()=> { this.searchkit.loading = true this.wrapper.update() expect(this.wrapper.html()).toBe("

loading...

") }) })