@uifabric/utilities
Version:
Fluent UI React utilities for building components.
16 lines • 664 B
JavaScript
define(["require", "exports", "sinon"], function (require, exports, sinon) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
/**
* 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