Jest Test files generated by IC don't match SF suggested filenames
Issue #2031
resolved
It’s great that I can use New->Lightning Web Component Test to generate a test file.
However, the default filename doesn’t match the suggested format from SF. They suggest
Jest runs JavaScript files in the __tests__ directory. Test files must have names that end in .js, and we recommend that tests end in .test.js.
IC creates the right directory, but the default filename is myComponentTest.js instead of myComponent.test.js
Can we change that?
Comments (4)
-
repo owner -
reporter Amazing… thanks, Scott!
-
repo owner - changed status to resolved
Delivered in 2.2.0.2.
-
repo owner - removed version
Removing version: Unassigned (automated comment)
- Log in to comment
Thank for pointing this out, Aidan. Yes, IC should follow documented best practices/recommendations. I've updated the default filename for a created Jest test accordingly for inclusion in the next build.