Add regression test for sync() reporting pending update as UP_TO_DATE - #46
Open
ofalvai wants to merge 1 commit into
Open
Add regression test for sync() reporting pending update as UP_TO_DATE#46ofalvai wants to merge 1 commit into
ofalvai wants to merge 1 commit into
Conversation
Add a scenario that calls sync() twice with ON_NEXT_RESTART, without any restart in between, and assert both calls report UPDATE_INSTALLED. This covers the case getUpdateMetadata()/getCurrentPackage().isPending must reflect a still-pending install, which was silently broken by the attachLocalPackageMethods regression (see PR #39 review comment).
There was a problem hiding this comment.
Pull request overview
Adds an integration regression test ensuring repeated sync() calls preserve the pending update status.
Changes:
- Adds a two-sync
ON_NEXT_RESTARTtest case. - Verifies pending metadata and
UPDATE_INSTALLEDstatuses without restarting.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
test/test.ts |
Registers the scenario and expected messages. |
test/template/scenarios/scenarioSyncRestart2x.js |
Implements the repeated-sync flow. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
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.
Why
Accidentally introduced a regression in #39, and there was no catch to catch the mistake: #39 (comment)
What
Add a scenario that calls
sync()twice withON_NEXT_RESTART, without any restart in between, and assert both calls report UPDATE_INSTALLED. This covers the casegetUpdateMetadata()/getCurrentPackage().isPendingmust reflect a still-pending install, which was silently broken by the attachLocalPackageMethods regression.