Skip to content

chore(vscode): adding tests for bad projects#4957

Merged
benfdking merged 1 commit intomainfrom
testing_starting_with_broken_project
Jul 11, 2025
Merged

chore(vscode): adding tests for bad projects#4957
benfdking merged 1 commit intomainfrom
testing_starting_with_broken_project

Conversation

@benfdking
Copy link
Contributor

No description provided.

@benfdking benfdking requested a review from Copilot July 11, 2025 13:14
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds a new end-to-end test to validate error handling and recovery for malformed model blocks in the VS Code extension.

  • Expanded the import from ./utils to include runCommand
  • Introduced a new test that writes a bad model SQL, verifies the error in the Problems view, then removes the file to confirm context reload
Comments suppressed due to low confidence (3)

vscode/extension/tests/broken_project.spec.ts:262

  • [nitpick] The test title is somewhat ambiguous. Consider renaming it to a more descriptive format such as should recover from bad model block after removal for clarity and consistency.
test('bad model block, then fixed', async ({ page, sharedCodeServer }) => {

vscode/extension/tests/broken_project.spec.ts:299

  • Asserting on a partial error message can make the test brittle. Consider matching the full expected message or using a regex to guard against formatting changes.
    .getByText("Required keyword: 'value' missing for")

vscode/extension/tests/broken_project.spec.ts:263

  • This setup (temp directory creation, project copy, and interpreter specifier) is duplicated across tests. Consider extracting it into a shared helper or fixture to reduce duplication.
  const tempDir = await fs.mkdtemp(

@benfdking benfdking merged commit 606b740 into main Jul 11, 2025
27 checks passed
@benfdking benfdking deleted the testing_starting_with_broken_project branch July 11, 2025 13:37
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