Closed doutori closed 4 years ago
pages/
src/pages/__test__
src/component
src/component/__test__
If the file exists, ask for confirmation of the override.
import * as React from 'react'; export type SampleProps = {}; const Sample: React.FC<SampleProps> = () => { return <div>Functional Component</div>; }; export default Sample;
/* eslint-env jest */ import * as React from 'react'; import { render } from '@testing-library/react'; import Sample, { SampleProps } from '~/components/Sample'; describe('sample', () => { let props: SampleProps; // Initialize beforeEach(() => { props = {}; }); it('renders without errors', () => { const { container } = render(<Sample {...props} />); expect(container).not.toBeNull(); }); });
Redux Action Generator is WIP.
Todo
A Difference of Component Type
Pages Type
pages/
dir.src/pages/__test__
dir.Default Type
src/component
dir.src/component/__test__
dir.Screen shot
If the file exists, ask for confirmation of the override.
Generated Code Samples
Sample.tsx
sample.test.tsx