test-utils
test-utils copied to clipboard
feat: allow to run e2e tests against existing server
Allow to pass the url of an already running server to setup and use this as the target instead of building and running a new server. This has two use cases:
- Run tests against a deployment of your application (i.e. "real" end-to-end tests)
- During local development, run tests against a already running dev server. This reduces the time to run tests and was wished for in eg https://github.com/nuxt/test-utils/issues/314#issuecomment-1983129269.
Usage:
setup({ endpoint: process.env.TEST_URL })
(or of course just using a hard-coded url)