[DX] Add FileSystemError to vscode mock
MR: !312 (merged)
Description
In feat: don't wait for initializeWithProgress on ... (!311 - merged) we ran into an issue because our jest mock for vscode
didn't provide anything for vscode.FileSystemError
. Let's fix this so we can appropriately unit test these error cases.
Context
The following discussion from !311 (merged) should be addressed:
-
@cindy-halim started a discussion: (+1 comment) @pslaughter what are your thoughts on this test? For some reason
vscode.FileSystemError
returnsundefined
within the test environment... so we can't simply useexpect().toThrow()
.
Investigation
This is because we have to provide a mock implementation for the vscode
package. The vscode
package actually doesn't exist in node_modules
but is automagically injected into the extension by VSCode during runtime.
So, we'll need to supply an implementation of vscode.FileSystemError
in this LOC.