0

I have a large VUE 3 project using VITEST and coverage with C8/istanbul. When I run "vitest dev --coverage", or just "vitest run", something is creating a "dist" folder under my "test" folder.

Note this is NOT the dist folder that holds a compiled app. This is created by the testing facility, not the build facility.

This happens as follows: I run the test. If --coverage, I am watching for changes. I edit a test file, VITEST re-runs automatically, and some JS files are created from TS test files and placed into a dist folder under the test folder.

I have been trying to find a reason for this, as well as a directive to stop it. I have to delete the dist file every time.

Is there a flag for this behavior in either VUE or VITEST?

2
  • Browsers don’t understand typescript, so it’s converted to JavaScript. The dist folder contains your compiled web app, what you would upload to a we server. Commented Jan 23, 2023 at 22:18
  • No, this is not the dist folder you are thinking of. That folder usually contains the complete build. This dist folder is created under the test folder and when populated contains the javascript form of the typescript test file. No one else in my team is having this problem. There must be a setting somewhere to prevent VITEST from doing this. Commented Jan 24, 2023 at 15:27

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.