import * as React from "react"; import {mount} from "enzyme"; import {NoHits} from "../src/NoHits"; import {SearchkitManager} from "../../../../core"; import { fastClick, hasClass, jsxToHTML, printPrettyHtml } from "../../../__test__/TestHelpers" import {InitialLoader} from "../src/InitialLoader"; describe("InitialLoader", ()=> { beforeEach(()=> { this.searchkit = SearchkitManager.mock() this.wrapper = mount( ) }) it("should render correctly", ()=> { expect(this.wrapper.html()).toEqual(jsxToHTML(
)) this.searchkit.initialLoading = false this.wrapper.update() expect(this.wrapper.children().length).toBe(0) }) it("should render a custom component", ()=> { let higherOrderComp = ({bemBlocks})=> (

Loading

) let wrapper = mount() expect(wrapper.html()).toEqual(jsxToHTML(

Loading

)) }) })