Fix four failing backend test files in Release CI#349
Merged
Conversation
…and JSDOM setup, Stay Local copy Co-authored-by: rajbos <6085745+rajbos@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix failing tests in release workflow
Fix four failing backend test files in Release CI
Mar 3, 2026
rajbos
approved these changes
Mar 3, 2026
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.
Four test files were failing with assertion errors (
ERR_ASSERTION) and type errors due to missing vscode mock entries, a missing method invocation, broken JSDOM initialization, and missing HTML content the tests expected.Changes
vscode-shim-register.tsViewColumnenum (needed byBackendConfigPanel.show())Uri.joinPath()static method (needed byrenderHtml())backend-cache-integration.test.tsBackendFacadebut never invokingcomputeDailyRollupsFromLocalSessions()— no warnings were ever generated, so allassert.ok(warnings.some(...))checks failedbackend-configurator.test.tswindow.__toolkitReady = truein all three JSDOMbeforeParsecallbacks sowaitForToolkit()immediately callsinit()and wires up event listeners. Without this, thechangeevent onauthModehad no handler./toolkit\.js"><\/script>/matched onlysrc=script tags. The actual HTML uses an inline module script (await import('toolkit.js')), which was left in and caused JSDOM to attempt network fetches:querySelector('#overview .helper')→querySelectorAll(...).some(h => h.includes('Stay Local'))since the matching text is not in the first helper elementdom.window.close()after each JSDOM test's assertionssrc/backend/configPanel.tsOriginal prompt
This pull request was created from Copilot chat.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.