create react app run test apecific folfer

Solutions on MaxInterview for create react app run test apecific folfer by the best coders in the world

showing results for - "create react app run test apecific folfer"
Mira
25 Jan 2020
1So, to run a single test in a create-react-app application, I run the following:
2npm run test -- -t 'test-name'
3
4Where test-name is the value used in the describe function in jest -
5describe('test-name', () => {
6  it('does something', () => { ... });
7});
8  
9Also you can use the name of the file in the command, and it will run only it.
10npm test src/components/App.test.js