Skip to content

Add regression test for sync() reporting pending update as UP_TO_DATE - #46

Open
ofalvai wants to merge 1 commit into
masterfrom
push-myrkkumplyop
Open

Add regression test for sync() reporting pending update as UP_TO_DATE#46
ofalvai wants to merge 1 commit into
masterfrom
push-myrkkumplyop

Conversation

@ofalvai

@ofalvai ofalvai commented Aug 25, 2026

Copy link
Copy Markdown
Collaborator

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 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.

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).

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Adds an integration regression test ensuring repeated sync() calls preserve the pending update status.

Changes:

  • Adds a two-sync ON_NEXT_RESTART test case.
  • Verifies pending metadata and UPDATE_INSTALLED statuses 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.

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.

2 participants