'src/components/**/*.test.js'.
So either we need to do something like tell Mocha to look for tests in 'src/components/**/__tests__/*.test.js'
or change where the tests are located in the project structure.
__test__
directory. Since src/components/**/*.test.js
serves the same purpose as src/components/**/__tests__/*.test.js
in our case as we are going to put test files only in the __tests__
folder. However, if we would like to keep it self explanatory, then we can do something like src/components/*/__tests__/*.test.js
but I don't really feel like it is necessary since we're going to maintain the structure anyways.
also one last thing regarding test location, in the package.json file you need to use double quotes for the test path rather than single quotes. You've got to use the escape char for double quotes so you can use two sets of them on your test line.
@joshdenz using single / double quotes really don't matter since both denote strings in shell.
Hey guys. Just an FYI here, your dependencies has 1 high severity vulnerability requiring an update to webpack-dev-server v3.1.14
A low severity issue that has been popping up every now and then in repositories. I'll update them though. Thanks for reminding!
render.test.js
for render tests, accessibility.test.js
for accessibility tests, edgecase.test.js
for edge case tests ( if any ) and so on.npm test
resulted in no tests being found. I needed to explicitly specify the __tests__
folder in package.json and I needed to use escaped double quotes for the path else no tests were found.