Skip to content

Commit

Permalink
test(launch-config): fix failing tests on windows (#2355)
Browse files Browse the repository at this point in the history
* test: fix failing tests on windows

fix failing tests on windows

* fix: correction

correction
  • Loading branch information
815are authored Sep 11, 2024
1 parent 3de0a5d commit 52a9d28
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ describe('launchConfig Unit Tests', () => {

describe('handleUnsavedWorkspace', () => {
it('should update paths for nested folders inside a workspace', () => {
const mockProjectPath = '/mock/project/nestedFolder';
const mockWsFolder = '/mock/workspace/folder';
const mockProjectPath = path.join('/mock/project/nestedFolder');
const mockWsFolder = path.join('/mock/workspace/folder');
const mockNestedFolder = 'nestedFolder';
mockVscode.workspace.getWorkspaceFolder.mockReturnValue({ uri: { fsPath: mockWsFolder } });
(path.relative as jest.Mock).mockReturnValue(mockNestedFolder);
Expand Down Expand Up @@ -252,8 +252,8 @@ describe('launchConfig Unit Tests', () => {
});

it('should handle unsaved workspace case', () => {
const mockProjectPath = '/mock/project/path';
const mockTargetFolder = '/target/folder';
const mockProjectPath = path.join('/mock/project/path');
const mockTargetFolder = path.join('/target/folder');
const mockVscode = {
workspace: {
getWorkspaceFolder: jest.fn().mockReturnValue(undefined),
Expand Down

0 comments on commit 52a9d28

Please sign in to comment.