Skip to content

e2e folder in SvelteKit template isn't type-checked #914

Closed

Description

@teemingc

Currently, the Svelte template adds an e2e directory for Playwright tests. However, this directory isn't type-checked (see sveltejs/kit#15254). We have 3 options:

  1. Rename "e2e" to "tests" which is covered by the generated tsconfig.json
  2. Change the generated tsconfig.json to recognise the "e2e" directory
  3. Include it via the SvelteKit typescript config option

Activity

  1. added theissue type on Feb 7, 2026
  2. changed the title [-]Rename `e2e` folder to `tests`[/-] [+]e2e folder in SvelteKit template isn't type-checked[/+] on Feb 7, 2026
  3. jycouet commented on Feb 7, 2026

    @jycouet
    Contributor

    Yes we should fix this!

    Some random points:

    • playwright.config.ts is today looking at this folder e2e
    • e2e & vitest will do:
    Image

    Me, I'm always changing stuff to have e2e tests close to the route, so I would move e2e/demo.test.ts to src/routes/page.svelte.e2e.ts and update the conf to look for tests ending with e2e.ts
    Bonus, no confusion between unit & e2e files,

    files
    unit .{test,spec}.{js,ts}
    e2e .e2e.{js,ts}

    And it would solve typecheck.

    What do you think?

  4. wyMinLwin commented on Feb 9, 2026

    @wyMinLwin
    Contributor

    I tried to solved by simply renaming it in PR #919

  5. linked a pull request that will close this issuefix: move e2e tests beside the page #919on Feb 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    pkg:create

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions