UNPKG

react-unit-test-generator

Version:

react-unit-test-generator is a helper for writing unit tests for React apps. Its main goal is to automatically generate a suite of the most common test cases for a given component.

11 lines (9 loc) 259 B
function generalImports(componentPath) { return ` import React from "react"; import { mount } from "enzyme"; import { MemoryRouter } from "react-router-dom"; import Component from "${componentPath}"; `; } export default generalImports;