@@ -36,7 +36,7 @@ import * as vscode from 'vscode';
3636import { extensionContextFactory } from '../../../vscode-api/extension-context.factories' ;
3737import { commandsProviderFactory , MockCommandsProvider } from '../../../vscode-api/commands-provider.factories' ;
3838import { MergeCommand } from './merge-command' ;
39- import { activeSolutionTrackerFactory , MockActiveSolutionTracker } from '../../../solutions/active-solution-tracker.factories ' ;
39+ import * as manifest from '../../../manifest ' ;
4040import { COutlineItem } from '../tree-structure/solution-outline-item' ;
4141import * as child_process from 'child_process' ;
4242import * as os from 'os' ;
@@ -48,7 +48,6 @@ jest.mock('os');
4848
4949describe ( 'MergeCommand' , ( ) => {
5050 let commandsProvider : MockCommandsProvider ;
51- let activeSolutionTracker : MockActiveSolutionTracker ;
5251 let command : MergeCommand ;
5352 const testDataHandler = new TestDataHandler ( ) ;
5453 let tmpDir : string ;
@@ -80,8 +79,7 @@ describe('MergeCommand', () => {
8079 fsUtils . writeTextFile ( path . join ( tmpDir , 'component.c.base@1.0.0' ) , '// base\n' ) ;
8180
8281 commandsProvider = commandsProviderFactory ( ) ;
83- activeSolutionTracker = activeSolutionTrackerFactory ( ) ;
84- command = new MergeCommand ( commandsProvider , activeSolutionTracker ) ;
82+ command = new MergeCommand ( commandsProvider ) ;
8583
8684 componentNode = new COutlineItem ( 'component' ) ;
8785 componentNode . setTag ( 'component' ) ;
@@ -358,7 +356,7 @@ describe('MergeCommand', () => {
358356 expect ( warningSpy ) . toHaveBeenCalledWith ( 'Merge exited with code 1. Conflicts may exist.' ) ;
359357 expect ( deleteFileIfExistsSpy ) . not . toHaveBeenCalled ( ) ;
360358 expect ( renameFileSpy ) . not . toHaveBeenCalled ( ) ;
361- expect ( activeSolutionTracker . triggerReload ) . not . toHaveBeenCalled ( ) ;
359+ expect ( commandsProvider . executeCommand ) . not . toHaveBeenCalledWith ( manifest . REFRESH_COMMAND_ID ) ;
362360 } ) ;
363361
364362 it ( 'handles merge errors gracefully' , async ( ) => {
@@ -436,7 +434,7 @@ describe('MergeCommand', () => {
436434 expect ( deleteFileIfExistsSpy ) . toHaveBeenCalledWith ( base ) ;
437435 expect ( renameFileSpy ) . toHaveBeenCalledWith ( update , expectedBase ) ;
438436 expect ( renameFileSpy ) . toHaveBeenCalledWith ( merged , local ) ;
439- expect ( activeSolutionTracker . triggerReload ) . toHaveBeenCalledTimes ( 1 ) ;
437+ expect ( commandsProvider . executeCommand ) . toHaveBeenCalledWith ( manifest . REFRESH_COMMAND_ID ) ;
440438 } ) ;
441439 } ) ;
442440} ) ;
0 commit comments