Skip to content

Commit 6224e9b

Browse files
authored
Fix compiler errors in test files (#56)
1 parent 457f4a8 commit 6224e9b

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

src/solutions/solution-manager.factories.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,14 @@ export const idleSolutionLoadStateFactory = makeFactory<SolutionLoadState>({
2828
solutionPath: () => undefined,
2929
loaded: () => undefined,
3030
converted: () => undefined,
31+
activated: () => undefined,
3132
});
3233

3334
export const activeSolutionLoadStateFactory = makeFactory<SolutionLoadState>({
3435
solutionPath: () => path.join(faker.system.filePath(), `${faker.word.noun()}.csolution.yml`),
3536
loaded: () => undefined,
3637
converted: () => undefined,
38+
activated: () => true,
3739
});
3840

3941
const fireOnDidChangeLoadState = (emitter: vscode.EventEmitter<SolutionLoadStateChangeEvent>) => {

src/views/solution-outline/commands/open-command.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ describe('OpenCommand', () => {
145145
fileItem.setAttribute('docPath', testFile);
146146
fileItem.addFeature('docFile');
147147

148-
jest.spyOn(mockOpenFileExternal, 'openFile').mockReturnValue(await Promise.resolve());
148+
jest.spyOn(mockOpenFileExternal, 'openFile').mockReturnValue(testFile);
149149
await commandsProvider.mockRunRegistered(OpenCommand.openDocCommandId, fileItem);
150150

151151
expect(mockOpenFileExternal.openFile).toHaveBeenCalledWith(testFile);
@@ -157,7 +157,7 @@ describe('OpenCommand', () => {
157157

158158
await commandsProvider.mockRunRegistered(OpenCommand.openHelpCommandId);
159159

160-
jest.spyOn(mockOpenFileExternal, 'openFile').mockReturnValue(await Promise.resolve());
160+
jest.spyOn(mockOpenFileExternal, 'openFile').mockReturnValue(OpenCommand.HELP_URL);
161161

162162
await commandsProvider.mockRunRegistered(OpenCommand.openHelpCommandId);
163163

@@ -183,7 +183,7 @@ describe('OpenCommand', () => {
183183

184184
await commandsProvider.mockRunRegistered(OpenCommand.openHelpCommandId);
185185

186-
jest.spyOn(mockOpenFileExternal, 'openFile').mockReturnValue(await Promise.resolve());
186+
jest.spyOn(mockOpenFileExternal, 'openFile').mockReturnValue(OpenCommand.HELP_URL);
187187

188188
await commandsProvider.mockRunRegistered(OpenCommand.openHelpCommandId);
189189

0 commit comments

Comments
 (0)