Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support in tests for serverApiProxy #206

Closed
vloss3 opened this issue Mar 11, 2024 · 1 comment
Closed

Add support in tests for serverApiProxy #206

vloss3 opened this issue Mar 11, 2024 · 1 comment

Comments

@vloss3
Copy link
Contributor

vloss3 commented Mar 11, 2024

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

@fago
Copy link
Contributor

fago commented Mar 22, 2024

fixed in #210

@fago fago closed this as completed Mar 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants