test-serve(main): `not-preserve-symlinks` test on Windows fails
See original GitHub issueDescribe the bug
it seems there is something broken on Windows running test-serve
script on main branch (Windows 10 PRO machine: I enable dev mode):
Reproduction
just clone main on a Window 10 machine and run the test-serve
script
System Info
npx envinfo --system --npmPackages '{vite,@vitejs/*}' --binaries --browsers
System:
OS: Windows 10 10.0.19044
CPU: (16) x64 Intel(R) Core(TM) i9-9900K CPU @ 3.60GHz
Memory: 41.21 GB / 63.95 GB
Binaries:
Node: 16.13.0 - C:\Program Files\nodejs\node.EXE
npm: 8.1.0 - C:\Program Files\nodejs\npm.CMD
Browsers:
Chrome: 102.0.5005.62
Edge: Spartan (44.19041.1266.0), Chromium (101.0.1210.53)
Internet Explorer: 11.0.19041.1566
Used Package Manager
pnpm
Logs
F:\work\projects\quini\GitHub\vite-esm-ssr-build>pnpm run test-serve
> vite-monorepo@ test-serve F:\work\projects\quini\GitHub\vite-esm-ssr-build
> vitest run -c vitest.config.e2e.ts
RUN v0.12.9 F:/work/projects/quini/GitHub/vite-esm-ssr-build
···-···-···-···--··--··············-····································································-········-···----······················-··························································-------··
····-···················---------····························--··x··································--------·································-····--····--···············································-·········
·······--······--······················--···················--············--·--··---
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Failed Tests 1 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
FAIL playground/preserve-symlinks/__tests__/preserve-symlinks.spec.ts > not-preserve-symlinks
AssertionError: expected '' to be 'hello vite' // Object.is equality
❯ playground/preserve-symlinks/__tests__/preserve-symlinks.spec.ts:10:42
8|
9| test('not-preserve-symlinks', async () => {
10| expect(await page.textContent('#root')).toBe('hello vite')
| ^
11| })
12|
- Expected "hello vite"
+ Received ""
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[1/1]⎯
Test Files 1 failed | 52 passed | 11 skipped (64)
Tests 1 failed | 442 passed | 63 skipped (506)
Time 20.58s (in thread 158.60s, 12.98%)
ELIFECYCLE Command failed with exit code 1.
Validations
- Follow our Code of Conduct
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn’t already an issue that reports the same bug to avoid creating a duplicate.
- Make sure this is a Vite issue and not a framework-specific issue. For example, if it’s a Vue SFC related bug, it should likely be reported to https://github.com/vuejs/core instead.
- Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
- The provided reproduction is a minimal reproducible example of the bug.
Issue Analytics
- State:
- Created a year ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Preserve Symlinks in Angular Libraries - Stack Overflow
I Need this, because when I use my component (inside the library) on my external application I got this error: NgBradButtonComponent.html:2 ...
Read more >ng test - Angular
Option Description Value Type Defau...
‑‑browsers Override which browsers tests are run against. string
‑‑code‑coverage Output a code coverage report. boolean false
‑‑code‑coverage‑exclude Globs to exclude...
Read more >TSConfig Option: preserveSymlinks - TypeScript
How to provide types to JavaScript ES6 classes. Made with ♥ in Redmond, Boston, SF & Dublin. Microsoft Logo. © 2012-2022 Microsoft
Read more >Test Runner: CLI and Configuration - Modern Web
The test runner can be configured using CLI flags, ... you are using and the browsers you are testing on, you may not...
Read more >rollup.js
compile to a CommonJS module ('cjs') rollup main.js --file bundle.js ... path at root level --preserveSymlinks Do not follow symlinks when resolving files ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@sapphi-red
closing, 0b054fc fix it, now
test
passing…FYI: on my laptop (Windows 10 PRO) I need to change
process.exit()
onscripts/patchCJS.ts
withprocess.exit(0)
, it seemsplugin-legacy
cannot be built: https://github.com/vitejs/vite/pull/8348#issuecomment-1140270143@userquin That fail is flaky. Would you try running the test several times? or apply https://github.com/vitejs/vite/pull/8049/commits/0b054fcb7f12f175ca29005dbed0e852cad240f4 which will reduce flaky fails.