Skip to content

Update yarn dev-vscode to build tests with dev mode (i.e. watch and recompile)#979

Merged
vezwork merged 2 commits into
mainfrom
feat/dev-build-watches-tests
May 15, 2026
Merged

Update yarn dev-vscode to build tests with dev mode (i.e. watch and recompile)#979
vezwork merged 2 commits into
mainfrom
feat/dev-build-watches-tests

Conversation

@seeM
Copy link
Copy Markdown
Collaborator

@seeM seeM commented May 15, 2026

Previously, if you ran the VS Code extension's tests from the test pane it would not trigger a recompile and would run stale tests. You had to use yarn test-vscode.

This PR updates yarn dev-vscode (more specifically, apps/vscode/build.ts) to also build tests with dev mode (i.e. a watch server that automatically recompiles).

@seeM seeM requested review from juliasilge and vezwork May 15, 2026 10:30
@posit-snyk-bot
Copy link
Copy Markdown
Contributor

posit-snyk-bot commented May 15, 2026

Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@vezwork
Copy link
Copy Markdown
Member

vezwork commented May 15, 2026

@seeM I am trying to understand the workflow you are describing. What is the test pane? Is this it? I don't see any tests here when I open the repo.
image

My personal workflow is to keep yarn dev-vscode running in the background while I'm working in the repo, I think this continuously recompiles the tests right? But if I understand correctly, it does not feel good to be able to run stale tests (regardless of workflow) with the yarn test-vscode command. This PR makes it so running yarn test-vscode first recompiles right? Does it also keep the build water running in the background after?

@vezwork
Copy link
Copy Markdown
Member

vezwork commented May 15, 2026

@seeM explained to me in Slack:

Today:

  • yarn dev-vscode does not compile tests
  • yarn test-vscode does recompile (on every run) and run tests

Running a test from the extension above does not recompile tests

After PR:

  • yarn dev-vscode additionally watches & compiles tests
  • yarn test-vscode as before

Running a test from the extension above still does not recompile, but dev-vscode will now handle that for us

He is using this extension to populate the test pane with extension tests: https://marketplace.visualstudio.com/items?itemName=ms-vscode.extension-test-runner

@vezwork
Copy link
Copy Markdown
Member

vezwork commented May 15, 2026

I tried this PR locally and was still getting stale tests when using the extension. I noticed the test-out dir was not getting cleared, and after manually deleting it and rebuilding, the stale tests went away. I added a commit that adds a small custom plugin to the build that clears the outdir (test-out in the case of the test build) before putting the built files back into it.

Copy link
Copy Markdown
Member

@vezwork vezwork left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Working well for me locally! A bit hard to test, but it should address all stale test issues we've been facing and doesn't have much of a downside.

@vezwork vezwork merged commit 823294a into main May 15, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants