@omni-door/tpl-spa-react
Version:
The React single-page-application project template
10 lines (9 loc) • 875 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.tpl_src_component_test = void 0;
var utils_1 = require("@omni-door/utils");
var tpl = "`import 'jsdom-global/register';\nimport * as React from 'react';\nimport { configure, shallow, render, mount } from 'enzyme';\nimport Adapter from '@cfaester/enzyme-adapter-react-18';\nimport sinon from 'sinon';\nimport { ${componentName} } from '../index';\n\nconfigure({ adapter: new Adapter() });\n\ndescribe('${componentName}', () => {\n it('renders correctly', () => {\n const wrapper = render(\n <${componentName} ${ts ? `history={{} as any} location={{} as any} match={{} as any}` : ''} />\n );\n expect(wrapper).toMatchSnapshot();\n });\n});\n`";
exports.tpl_src_component_test = {
tpl: tpl
};
exports.default = utils_1.tplEngineInit(exports.tpl_src_component_test, 'tpl');