Worker vitest push test file to R2

Hey, I am writing an implementation that utilises pre-uploaded files to R2. As part of this I want to write integration tests for this that can run locally with a test file. I was looking at having vitest push the file into the local R2 bucket before the tests run, but due to not having fs access I don't believe this is possible. Does anyone have any guidance on how I could go about doing this? The entire codebase relies on a single file existing in the bucket, which is uploaded in production as an external process. Cheers!
Was this page helpful?