Open with-heart opened 3 months ago
Latest commit: 8cf97419ac0368885774b2b1cd07e1bb1c49d493
Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.
Click here to learn what changesets are, and how to add one.
Click here if you're a maintainer who wants to add a changeset to this PR
I'd like to block this on updating the VS Code
launch.json
script. It's essential to my workflow.Extra questions:
- Does Vitest have an interactive watch mode in which I could filter tests using filenames or/and test names?
- If yes, does it have something akin to
jest-watch-typehead
?
Yes; here is an example in @statelyai/agent
:
I'd like to block this on updating the VS Code launch.json script. It's essential to my workflow.
I've got you buddy 🤗
I'd like to block this on updating the VS Code launch.json script. It's essential to my workflow.
@Andarist Wanna test it locally and make sure it's working the way you expect?
I noticed it's fairly easy to lose those typeahead filters in watch mode (for example pressing Enter clears them). It's annoying but not a big deal.
When debugging with VS Code, I can't disable source mapped stepping - it still shows me a location in the source file (albeit a different/broken one). This is way more annoying, probably something I can live with but well. I just wish that console evaluation could use original references, is this too much to ask for? 😭 😭 😭 (to clarify, this is just something that current debuggers suck at cause they are not utilizing sourcemapped info to its full extent)
I noticed it's fairly easy to lose those typeahead filters in watch mode (for example pressing Enter clears them). It's annoying but not a big deal.
Yeah for some reason they chose to use r
for re-running filtered tests. Quite an annoying change if you're a long-time jest
user 🥲
This PR switches our test setup from
jest
tovitest
.How it's configured
vitest.workspace.json
defines our workspaces as["packages/*"]
.vitest
looks for avitest.config
file in each workspace and uses it to run that workspace's tests. This allows each workspace to define the plugins (likevite-plugin-solid
for@xstate/solid
) and test configuration used to run that workspace's tests.This allows us to run tests for specific workspaces using
vitest --project <package name>
(vitest --project @xstate/react
).Major changes
jest
dependencies (11❗), configs, scripts, etc.jsdom
withhappy-dom
done
callbacks withnew Promise
callbacks +resolve
vite
plugins to some packages for out-of-the-box support in tests@xstate-repo/jest-utils
packagetoMatchMockCallsInlineSnapshot
withtoMatchInlineSnapshot
(vitest
doesn't support wrapping snapshot functions the way we could withjest-snapshot
)spyOnConsole
with inlineconsole
spies for the tests that require itsleep
withsetTimeout
fromnode:timers/promises