question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

test-serve(main): `not-preserve-symlinks` test on Windows fails

See original GitHub issue

Describe 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):

imagen

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

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
userquincommented, May 28, 2022

@sapphi-red

closing, 0b054fc fix it, now test passing…

FYI: on my laptop (Windows 10 PRO) I need to change process.exit() on scripts/patchCJS.ts with process.exit(0), it seems plugin-legacy cannot be built: https://github.com/vitejs/vite/pull/8348#issuecomment-1140270143

0reactions
sapphi-redcommented, May 28, 2022

@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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found