Skip to content

Convert all tests in connectionStore.test.ts to use sinon instead of typemoq #19708

@Benjin

Description

@Benjin

Description

TypeMoq for Typescript is an old mocking framework that is no longer updated. We want to eventually remove it, but need to first convert our existing tests to use Sinon instead. We'll do this one file at a time, so only focus on the file specified.

  • Only convert this file: connectionStore.test.ts
  • Use sinon for mocking behavior and classes.
  • Use Chai for assertions/validations.
  • Create or use existing test/stub helper functions where necessary/possible.
  • Reference existing converted tests for how to set up and structure the mocks
  • Rewrite the same test cases with the same validations. Don't add new tests or validations to existing tests.

Existing converted tests for reference:

  • objectExplorerDragAndDropController.test.ts
  • objectExplorerService.test.ts

Steps to Reproduce

n/a

Affected Area

  • Connection dialog
  • Query results panel
  • Query editor
  • Object Explorer
  • Table Designer
  • Schema Compare
  • Schema Designer
  • Local container
  • GitHub Copilot integration
  • Query Plan Visualizer
  • Other (please describe below)

If you selected "Other", please describe the affected area

No response

Environment Information

n/a

Confirmation

  • I have searched existing issues and couldn't find a match
  • I want to work on this issue

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions