Open
Description
Similar, but not the same as #28781
System info
- Playwright Version: v.1.41.0
- Operating System: macOS 14.2.1
- Browser: All
- Other info:
Source code
https://github.com/shadow-identity/sk2-playwright-repro
[We will only be able to work on the issues that we can reproduce.]
[Please provide a self-contained example in a form of a snippet, archive or a repository.]
[Repro scenario can't be large or have external dependencies.]
Steps
- Make a fresh install of the SvelteKit with Typescript and Playwright support
- Add
src/lib/foo.ts
with exportedfoo
function - Add
src/lib/baz.ts
with exportedbaz
function. Thebaz.ts
should import and usefoo
function - Import
baz
intotests/test.ts
and use it inside of thetest
function call - To be sure that it is not the same issue as [BUG] cannot see $lib with sveltekit2 #28781, apply the workaround
Expected
Tests are passed, "foo" is printed in the console.
Actual
Tests fails with this output
> playwright test
[WebServer] "confetti" is imported from external module "@neoconfetti/svelte" but never used in "src/routes/sverdle/+page.svelte".
Error: Cannot find package '$lib' imported from /Users/pnedrigailov/my/tmp/sk2/src/lib/baz.ts
Error: No tests found
ELIFECYCLE Command failed with exit code 1.