in my project i use typescript and vue.js. I decided to write some unit test and tried to use mocha + ts-node. Problem is that when i run mocha it tries to load all files included *.vue which gives me error. Ts-node just doesn't know how to handle this extension. Is there any way to skip *.vue files?
0
votes
1 Answers
0
votes
When you run mocha, you can specify a glob to pick the files you want to run tests. Name your test files with this pattern to match the glob.
i.e
mocha './tests/*.test.ts'
// This only pick files ending in .test.ts on tests/ folder.
Some documentation: https://mochajs.org/#the-test-directory