Currently, the serverApiProxy option is set to false in tests due to tests using relative baseURL, e.g. baseURL: '/api'
Requirements
Tests use serverApiProxy feature.
The mocked API uses an absolute URL.
Implementation notes
This is an issue because Vitest runs every test on a randomized port, a possible solution would be to find the current port and create an absolute URL, e.g. http://localhost:PORT/api
Motivation / Goals
Currently, the
serverApiProxy
option is set to false in tests due to tests using relative baseURL, e.g.baseURL: '/api'
Requirements
Tests use serverApiProxy feature. The mocked API uses an absolute URL.
Implementation notes
This is an issue because Vitest runs every test on a randomized port, a possible solution would be to find the current port and create an absolute URL, e.g. http://localhost:PORT/api