positron: add api tests in ci#1058
Open
isabelizimm wants to merge 8 commits into
Open
Conversation
Contributor
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
The macos-latest runner has ~7 GB RAM, so Node's default V8 old-space heap limit (~2 GB) is too small for the vscode-editor vite build, which OOMs during 'yarn run build-vscode'. The same build passes on ubuntu runners (16 GB RAM, ~4 GB default heap). Set NODE_OPTIONS to match.
Running with extensions enabled (disableExtensions: false) keeps the
gallery active, so Positron auto-updates 'outdated' extensions on
startup and disables/removes the development Quarto extension loaded via
extensionDevelopmentPath. By test time getExtension('quarto.quarto')
returns undefined ('Extension quarto.quarto not found').
Seed a throwaway user-data-dir with extensions.autoUpdate /
autoCheckUpdates set to false and pass it via launchArgs. positron-test-
electron appends our launchArgs last, and Positron uses the last
--user-data-dir, so our seeded settings win.
positron-test-electron 0.0.2 disables extension auto-update inside the test host it launches (seeding its own temp user-data-dir), which keeps the development Quarto extension from being evicted mid-run. Passing a second --user-data-dir from the runner (to seed the same setting ourselves) made Positron's getUserDataPath receive an array and crash with ERR_INVALID_ARG_TYPE, so drop it — 0.0.2 covers it in-package. Pin the dependency to ^0.0.2 (was floating "latest", which had locked to the fix-less 0.0.1) so CI installs the version with the fix.
isabelizimm
marked this pull request as ready for review
July 17, 2026 18:41
This was referenced Jul 21, 2026
Collaborator
Author
|
Looks like the same failure is showing up on main, but the rest should be ready to go!
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a separate integration test suite that runs the Quarto extension inside Positron (rather than vanilla VS Code), so we can cover Positron-specific code paths that the main @vscode/test-cli suite can't reach.
Tests added (
apps/vscode/src/test/positron/)execute-cell.test.ts— Verifies the Quarto-specific transformations that happen before delegating topositron.runtime.executeCode:#| ...) are stripped from executed code.reticulate::repl_python(...)and submitted to the R runtime.notebook-export.test.ts— Verifies Quarto registers its.qmdexporter with Positron's built-inpositron.notebook-exportextension API (cross-extension wiring absent in vanilla VS Code).Test harness / infra
scripts/run-positron-tests.mjs— Launcher using@posit-dev/positron-test-electron. Runs with extensions enabled (opts out of the default--disable-extensions) so Positron's bundled runtimes and notebook-export extension are available. Extension auto-update is disabled in the test host — otherwise Positron treats the dev-loaded extension as "outdated" and removes it mid-run.index.ts— Mocha entry point (tdd UI, 120s timeout) that discovers and runs the compiled tests.build.ts— Includespositron/*.tsin the test build.package.json— Addstest-positronscripts (app + root) and the@posit-dev/positron-test-electrondev dependency..gitignore— Ignores.positron-test.Run locally with
yarn test-positron.CI
.github/workflows/test-positron.yaml— New workflow. Runs the tests via theposit-dev/setup-positronaction, which downloads a Positron build and executesyarn test-positroninside it.