UNPKG

@uifabric/utilities

Version:

Fluent UI React utilities for building components.

15 lines 561 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var sinon = require("sinon"); /** * Replaces the enzyme render function with a spy that can be used to count how many * times the render function was called in a test. * @param wrapper - The wrapper around the component instance for which you want to spy upon */ function setRenderSpy(wrapper) { var spy = sinon.spy(wrapper.instance().render); wrapper.instance().render = spy; return spy; } exports.setRenderSpy = setRenderSpy; //# sourceMappingURL=setRenderSpy.js.map