Skip to content

Conversation

@ssreerama
Copy link
Contributor

@ssreerama ssreerama commented Feb 12, 2026

Pull Request Template – vscode-mssql

Description

In this PR:

  • We removed should and TypeMoq libraries from the extension
  • Converted all Mocks to sinon.sandbox
  • Converted all should assertions to expect()
  • Fixed all skipped tests
  • local run results:
image

Code Changes Checklist

  • New or updated unit tests added
  • All existing tests pass (npm run test)
  • Code follows contributing guidelines
  • Telemetry/logging updated if relevant
  • No regressions or UX breakage

Reviewers: Please read our reviewer guidelines

…d returnign the value from sts instead of hardcoded false
Base automatically changed from sai/feb/Cleanup_sqlproj_Tests to sai/feb/Cleanup_sqlproj February 12, 2026 22:43
Base automatically changed from sai/feb/Cleanup_sqlproj to main February 12, 2026 23:44
Copilot AI review requested due to automatic review settings February 12, 2026 23:58
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 migrates the SQL Database Projects extension tests from the should and TypeMoq testing libraries to chai (expect) and sinon.sandbox for mocking. The migration aims to modernize the test infrastructure and improve test maintainability.

Changes:

  • Removed should and TypeMoq dependencies from package.json and yarn.lock
  • Converted all test assertions from should() to expect() syntax
  • Migrated all mocks from TypeMoq.Mock.ofType() to sinon stubs/spies
  • Introduced sandbox pattern for sinon to ensure proper cleanup between tests
  • Fixed duplicate code in projectController.ts source file

Reviewed changes

Copilot reviewed 17 out of 19 changed files in this pull request and generated no comments.

Show a summary per file
File Description
yarn.lock Removed should and TypeMoq library entries
package.json Removed should and typemoq dev dependencies
utils.test.ts Migrated assertions to chai expect syntax
updateProjectFromDatabaseQuickpick.test.ts Added sandbox pattern and migrated assertions
testUtils.ts Modified shouldThrowSpecificError to use expect and handle Windows path differences
testContext.ts Removed TypeMoq usage, using plain object for dacFxService
sqlDatabaseProjectTaskProvider.test.ts Migrated all should assertions to expect
runTest.ts Improved test runner configuration and comments
projectTree.test.ts Converted all should assertions to expect
projectController.test.ts Large migration with sandbox pattern, contains duplicate test
project.test.ts Migrated all assertions, removed projectSuite conditional
newProjectTool.test.ts Replaced TypeMoq with plain object mocks
netCoreTool.test.ts Added sandbox pattern
mainController.test.ts Migrated assertions and added sandbox
dialogTestUtils.ts Removed TypeMoq, using plain objects
datasource.test.ts Migrated assertions to expect
createProjectFromDatabaseQuickpick.test.ts Added sandbox pattern and migrated assertions
autorestHelper.test.ts Added sandbox and unskipped test
projectController.ts Removed duplicate areEqual check (source code fix)

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@github-actions
Copy link

github-actions bot commented Feb 13, 2026

PR Changes

Category Target Branch PR Branch Difference
vscode-mssql VSIX 5976 KB 5976 KB ⚪ 0 KB ( 0% )
sql-database-projects VSIX 7758 KB 7776 KB ⚪ 18 KB ( 0% )
data-workspace VSIX 537 KB 537 KB ⚪ 0 KB ( 0% )

@codecov-commenter
Copy link

codecov-commenter commented Feb 13, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 69.18%. Comparing base (4a58694) to head (e955ab0).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main   #21179      +/-   ##
==========================================
+ Coverage   69.15%   69.18%   +0.02%     
==========================================
  Files         256      256              
  Lines       25201    25201              
  Branches     3286     3286              
==========================================
+ Hits        17429    17435       +6     
+ Misses       7635     7630       -5     
+ Partials      137      136       -1     

see 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@ssreerama ssreerama self-assigned this Feb 13, 2026
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