Skip to content

Evaluate & remove unnecessary module mocks #3920

@traeok

Description

@traeok

Is your feature request related to a problem? Please describe.

In a recent PR, I noticed we were adding to a version of the ImperativeError class that's existed in a module mock for quite some time. I don't think this is good practice because classes such as error classes shouldn't need stubbed out, if anything we can use the real implementation and mock out what we need.

Describe the solution you'd like

Look for unnecessary module mocks and remove them to make unit test maintenance easier.
Consider dropping module mocks from vscode.ts in favor of jest-mock-vscode.

Describe alternatives you've considered

We can continue to stub out parts of Imperative and Zowe classes in module mocks, but this introduces separation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Technical DebtIncludes Architecture, Code, Testing, Automation debtenhancementNew feature or request

    Type

    No type

    Projects

    Status

    New Issues

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions