File tree Expand file tree Collapse file tree 2 files changed +10
-7
lines changed Expand file tree Collapse file tree 2 files changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -46,10 +46,11 @@ const formatFieldQuickPickValues = (
46
46
}
47
47
48
48
const prevFileValue = formattedFields [ file ]
49
- formattedFields [ file ] = [
50
- ...( typeof prevFileValue === 'string' ? [ prevFileValue ] : prevFileValue ) ,
51
- key
52
- ]
49
+ if ( typeof prevFileValue === 'string' ) {
50
+ formattedFields [ file ] = [ prevFileValue ]
51
+ }
52
+
53
+ ; ( formattedFields [ file ] as string [ ] ) . push ( key )
53
54
}
54
55
55
56
return formattedFields
Original file line number Diff line number Diff line change @@ -309,12 +309,14 @@ suite('Pipeline Test Suite', () => {
309
309
expect ( mockPickPlotConfiguration ) . to . be . calledOnce
310
310
expect ( mockAddPlotToDvcFile ) . not . to . be . called
311
311
312
- mockPickPlotConfiguration . onSecondCall ( ) . resolves ( {
312
+ const mockPlotConfig : PipelineQuickPick . PlotConfigData = {
313
313
template : 'simple' ,
314
314
title : 'Great Plot Name' ,
315
- x : { file : 'results.json' , key : 'step' } ,
315
+ x : { 'results.json' : 'step' } ,
316
316
y : { 'results.json' : 'acc' }
317
- } )
317
+ }
318
+
319
+ mockPickPlotConfiguration . onSecondCall ( ) . resolves ( mockPlotConfig )
318
320
319
321
await pipeline . addDataSeriesPlot ( )
320
322
You can’t perform that action at this time.
0 commit comments