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.

Watch mode with `vite-jest --watch`

See original GitHub issue

I can only press a once to re-run the tests, then after second run I get

  ● Test suite failed to run

    Server is not running.

and can’t re-run tests anymore.

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
zigomircommented, Jan 5, 2022

@sodatea Actually I’m still getting this, but only every second re-run.

Output this time is:

  ● Test suite failed to run

    The server is not running

      at WebSocketServer.<anonymous> (node_modules/.pnpm/ws@8.3.0/node_modules/ws/lib/websocket-server.js:155:14)
      at emitClose (node_modules/.pnpm/ws@8.3.0/node_modules/ws/lib/websocket-server.js:442:10)

I’m using vite@2.7.10 and vite-jest@0.1.4.

1reaction
sodateacommented, Dec 7, 2021

Got it. It’s due to the cache of the Vite dev server. I found an easy fix. Will patch it soon.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Issues · sodatea/vite-jest - GitHub
First-class Vite integration for Jest. Contribute to sodatea/vite-jest development by creating an account on GitHub. ... Watch mode with vite-jest --watch.
Read more >
Features | Guide - Vitest
Vite 's config, transformers, resolvers, and plugins. ... Smart & instant watch mode, like HMR for tests! ... Jest-compatible Snapshot.
Read more >
Setup Jest with Vite (featuring SWC) - Blog by hung.dev
First, generate React Typescript project using Vite. · Then, install the main dependency jest : · Install react-testing-library packages: · Exclude ...
Read more >
Adding Jest with TypeScript Support to a Vite Application
The app is built on top of vite instead of the more popular create react app. ... Using Jest in Watch Mode with...
Read more >
Testing Vite with minimal config using Vitest - LogRocket Blog
Vitest's holistic approach to testing suites: Jest, Babel, and webpack all ... Running in watch mode is much faster than the Jest equivalent ......
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