Skip to content

Instantly share code, notes, and snippets.

@avilde
Created June 4, 2020 06:56
Show Gist options
  • Save avilde/d7050f52e72406a2f121d36caca85b77 to your computer and use it in GitHub Desktop.
Save avilde/d7050f52e72406a2f121d36caca85b77 to your computer and use it in GitHub Desktop.
Create new test file for React functional component template
{
"New Test React FC": {
"prefix": "ntfc",
"body": [
"import React from 'react';",
"import { render } from '@testing-library/react';",
"import ${1} from './${1}';",
"",
"it ('${1} renders without crashing', () => {",
"\trender(",
"\t\t<${1} />",
"\t);",
"});"
],
"description": "Create new test file React functional component"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment