0

I am writing vitest tests that need http access to files in the public folder, which will be under the base url at production. What is a good way to accomplish this? I was hoping to find a plugin that would accomplish this, but came up empty. I was thinking that I'd be able to configure vitest to set up and tear down a little server.

Feel free to beg the question - to suggest not using the public folder, for example, if that gets me somewhere.

This is an Astro app, and the code under test is client-only in production. The file is a 3MB parquet data file, and I'm using hyparquet to read it. Hyparquet uses ranged HTTP requests to read selected chunks of the file, which I am leveraging for performance. So I definitely DON'T want to bundle it or use some other API to fetch it.

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.