@@ -33,7 +33,7 @@ const mockedQuickPickOne = jest.mocked(quickPickOne)
3333const mockedQuickPickManyValues = jest . mocked ( quickPickManyValues )
3434const mockedQuickPickOneOrInput = jest . mocked ( quickPickOneOrInput )
3535const mockedGetValidInput = jest . mocked ( getValidInput )
36- const mockedPickExperiment = jest . fn ( )
36+ const mockedPickCommitOrExperiment = jest . fn ( )
3737const mockedGetInput = jest . mocked ( getInput )
3838const mockedRun = jest . fn ( )
3939const mockedExpFunc = jest . fn ( )
@@ -91,7 +91,7 @@ describe('Experiments', () => {
9191 {
9292 '/my/dvc/root' : {
9393 getDvcRoot : ( ) => mockedDvcRoot ,
94- pickExperiment : mockedPickExperiment ,
94+ pickCommitOrExperiment : mockedPickCommitOrExperiment ,
9595 showWebview : mockedShowWebview
9696 } as unknown as Experiments ,
9797 '/my/fun/dvc/root' : {
@@ -138,12 +138,12 @@ describe('Experiments', () => {
138138 it ( 'should call the correct function with the correct parameters if a project and experiment are picked' , async ( ) => {
139139 mockedQuickPickOne . mockResolvedValueOnce ( mockedDvcRoot )
140140 mockedListStages . mockResolvedValueOnce ( 'train' )
141- mockedPickExperiment . mockResolvedValueOnce ( 'a123456' )
141+ mockedPickCommitOrExperiment . mockResolvedValueOnce ( 'a123456' )
142142
143143 await workspaceExperiments . getCwdAndExpNameThenRun ( mockedCommandId )
144144
145145 expect ( mockedQuickPickOne ) . toHaveBeenCalledTimes ( 1 )
146- expect ( mockedPickExperiment ) . toHaveBeenCalledTimes ( 1 )
146+ expect ( mockedPickCommitOrExperiment ) . toHaveBeenCalledTimes ( 1 )
147147 expect ( mockedExpFunc ) . toHaveBeenCalledTimes ( 1 )
148148 expect ( mockedExpFunc ) . toHaveBeenCalledWith ( mockedDvcRoot , 'a123456' )
149149 } )
@@ -240,7 +240,7 @@ describe('Experiments', () => {
240240 it ( 'should call the correct function with the correct parameters if a project and experiment are picked and an input provided' , async ( ) => {
241241 mockedQuickPickOne . mockResolvedValueOnce ( mockedDvcRoot )
242242 mockedListStages . mockResolvedValueOnce ( 'train' )
243- mockedPickExperiment . mockResolvedValueOnce ( 'a123456' )
243+ mockedPickCommitOrExperiment . mockResolvedValueOnce ( 'a123456' )
244244 mockedGetInput . mockResolvedValueOnce ( 'abc123' )
245245
246246 await workspaceExperiments . getCwdExpNameAndInputThenRun (
@@ -250,7 +250,7 @@ describe('Experiments', () => {
250250 )
251251
252252 expect ( mockedQuickPickOne ) . toHaveBeenCalledTimes ( 1 )
253- expect ( mockedPickExperiment ) . toHaveBeenCalledTimes ( 1 )
253+ expect ( mockedPickCommitOrExperiment ) . toHaveBeenCalledTimes ( 1 )
254254 expect ( mockedExpFunc ) . toHaveBeenCalledTimes ( 1 )
255255 expect ( mockedExpFunc ) . toHaveBeenCalledWith (
256256 mockedDvcRoot ,
@@ -276,7 +276,7 @@ describe('Experiments', () => {
276276 it ( 'should not call the function if user input is not provided' , async ( ) => {
277277 mockedQuickPickOne . mockResolvedValueOnce ( mockedDvcRoot )
278278 mockedListStages . mockResolvedValueOnce ( 'train' )
279- mockedPickExperiment . mockResolvedValueOnce ( {
279+ mockedPickCommitOrExperiment . mockResolvedValueOnce ( {
280280 id : 'b456789' ,
281281 name : 'exp-456'
282282 } )
@@ -296,7 +296,7 @@ describe('Experiments', () => {
296296 it ( 'should check and ask for the creation of a pipeline stage before running the command' , async ( ) => {
297297 mockedQuickPickOne . mockResolvedValueOnce ( mockedDvcRoot )
298298 mockedListStages . mockResolvedValueOnce ( '' )
299- mockedPickExperiment . mockResolvedValueOnce ( {
299+ mockedPickCommitOrExperiment . mockResolvedValueOnce ( {
300300 id : 'a123456' ,
301301 name : 'exp-123'
302302 } )
0 commit comments