Skip to content

test: add missing test coverage for PRs #684, #687, #706 - #767

Merged
edvilme merged 6 commits into
mainfrom
phase2-test-coverage
Apr 2, 2026
Merged

test: add missing test coverage for PRs #684, #687, #706#767
edvilme merged 6 commits into
mainfrom
phase2-test-coverage

Conversation

@edvilme

@edvilme edvilme commented Apr 1, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds missing test coverage for merged PRs, as tracked by #765.

Part of the cross-repo test coverage initiative: microsoft/vscode-python-tools-extension-template#290

Tests added

PR #684 — Python version boundary

  • python.unit.test.ts: Rejects Python 3.9 (both envs and legacy paths); accepts Python 3.10 minimum

PR #687 — Status bar loading/error states

  • status.unit.test.ts: Loading spinner, error state, normal score display, non-active document handling, zero score

PR #706 — checkIfConfigurationChanged

  • settings.unit.test.ts: All tracked settings trigger change detection; unrelated settings return false

Skipped PRs

PR Reason
#705 (server lifecycle) Hard to unit test without integration framework
#732 (contextlib.suppress) Pure refactor, no behavioral change
#737 (package type swap) Downstream logic already covered

Refs #765

edvilme and others added 3 commits April 1, 2026 09:12
#765, relates to #684)

Adds tests verifying that Python 3.9 is correctly rejected after the
PYTHON_MINOR constant was changed from 9 to 10. Tests both the
Environments extension path and the legacy extension path.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…s to #687)

Tests the updateScore behavior introduced in PR #687:
- Numeric score displays formatted score text
- Undefined score (lintingStarted) shows loading spinner
- Score of -1 (lintingFailed) shows error state
- Non-active document score update does not change display
- Zero score displays correctly

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Tests that checkIfConfigurationChanged correctly detects changes to all
tracked configuration settings and returns false for unrelated settings.

Note: PR #706 also added getServerEnabled and serverEnabled to the
tracked settings list, but those changes are not present in the current
codebase. Tests cover only the currently implemented behavior.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@edvilme edvilme added the debt Technical debt or repo cleanup label Apr 1, 2026
@edvilme edvilme changed the title test: add missing test coverage for phase 2 PRs test: add missing test coverage for PRs #684, #687, #706 Apr 1, 2026
Comment thread src/test/ts_tests/tests/common/settings.unit.test.ts
rchiodo
rchiodo previously approved these changes Apr 1, 2026

@rchiodo rchiodo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Approved via Review Center.

Extract getTrackedSettings() from checkIfConfigurationChanged() so the
test imports the canonical list instead of maintaining a hardcoded copy.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Comment thread src/test/ts_tests/tests/common/status.unit.test.ts
Replace assert.include with assert.strictEqual for tooltip checks
to match the pattern used by all other tooltip assertions in the file.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@edvilme
edvilme requested a review from rchiodo April 2, 2026 20:05
Comment thread src/test/ts_tests/tests/common/status.unit.test.ts

@rchiodo rchiodo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Approved via Review Center.

@edvilme
edvilme merged commit d1948aa into main Apr 2, 2026
21 checks passed
@edvilme
edvilme deleted the phase2-test-coverage branch April 2, 2026 21:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

debt Technical debt or repo cleanup

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants