Files
vercel__flags/tests
Simon H 701f3c2bf2 Sveltekit flags enhancements (#75)
* use `$env/dynamic/private` from SvelteKit for convenience: people don't have to pass FLAGS_SECRET manually anymore then

* allow flag to be called outside of the lifecycle of the handle hook, with a request object being the key for deduplication etc

* add support for identifiers

* fix types

* new function for managing precomputed flags

* align with next.js API instead

* update example app

* lockfile

* test

* fix example

* restructure examples app

* make it two flags to show power of precompute + code

* add manual approach

* lets see if preview deployment is picked up

* change crypto usage to be usable in middleware

* make sveltekit flags pkg usable within edge middleware

* use ISR

* changeset

* enhance error message

* use static env instead of dynamic env

* bump kit

* use vercel adapter

* make sure Vite tooling is used for sveltekit entry point

---------

Co-authored-by: Dominik Ferber <dominik.ferber@gmail.com>
2025-03-21 14:43:28 +02:00
..
2025-02-20 19:54:09 +02:00
2025-02-20 19:54:09 +02:00
2024-12-12 13:01:06 +02:00

e2e tests

We run e2e tests for multiple versions of Next.js.

We run them for the latest release of every major release from Next.js 13 onwards.

Locally the tests run against the dev server. Playwright will either start the dev server or reuse an already running instance if there is one on the configured port.

In CI the tests run against the production server. We use turbo.json to first build and then start the server.

The test applications are not deployed anywhere to keep the action fast.

Ports

The port of each application indicates the Next.js version

  • next-13 runs on 4013
  • next-13 runs on 4014
  • next-15 runs on 4015
  • sveltekit runs on 5173

Developing locally

If you want to write or debug e2e tests for a specific Next.js version you can

Terminal 1

  • pnpm next-14

Terminal 2

  • cd tests/next-14
  • pnpm playwright test or pnpm playwright test --ui