11import { join , resolve } from 'path'
2- import { afterEach , beforeEach , describe , it , suite } from 'mocha'
2+ import { after , afterEach , beforeEach , describe , it , suite } from 'mocha'
33import { expect } from 'chai'
44import { stub , spy , restore , SinonStub } from 'sinon'
55import {
@@ -67,6 +67,7 @@ import { shortenForLabel } from '../../../util/string'
6767import { GitExecutor } from '../../../cli/git/executor'
6868import { WorkspacePlots } from '../../../plots/workspace'
6969import { RegisteredCommands } from '../../../commands/external'
70+ import { ConfigKey } from '../../../vscode/config'
7071
7172suite ( 'Experiments Test Suite' , ( ) => {
7273 const disposable = Disposable . fn ( )
@@ -172,6 +173,12 @@ suite('Experiments Test Suite', () => {
172173 } )
173174
174175 describe ( 'handleMessageFromWebview' , ( ) => {
176+ after ( ( ) => {
177+ workspace
178+ . getConfiguration ( ConfigKey . EXP_TABLE_HEAD_MAX_DEPTH )
179+ . update ( '' , undefined , false )
180+ } )
181+
175182 const setupExperimentsAndMockCommands = ( ) => {
176183 const {
177184 columnsModel,
@@ -883,9 +890,8 @@ suite('Experiments Test Suite', () => {
883890 it ( 'should be able to handle a message to update the table depth' , async ( ) => {
884891 const { experiments } = buildExperiments ( disposable , expShowFixture )
885892 const inputEvent = getInputBoxEvent ( '0' )
886- const tableMaxDepthOption = 'dvc.experimentsTableHeadMaxHeight'
887893 const tableMaxDepthChanged = configurationChangeEvent (
888- tableMaxDepthOption ,
894+ ConfigKey . EXP_TABLE_HEAD_MAX_DEPTH ,
889895 disposable
890896 )
891897
@@ -901,7 +907,7 @@ suite('Experiments Test Suite', () => {
901907 await tableMaxDepthChanged
902908
903909 expect (
904- await workspace . getConfiguration ( ) . get ( tableMaxDepthOption )
910+ workspace . getConfiguration ( ) . get ( ConfigKey . EXP_TABLE_HEAD_MAX_DEPTH )
905911 ) . to . equal ( 0 )
906912 expect ( mockSendTelemetryEvent ) . to . be . called
907913 expect (
0 commit comments