@@ -430,13 +430,24 @@ export function isVariantAnalysisLiveResultsEnabled(): boolean {
430430 return ! ! LIVE_RESULTS . getValue < boolean > ( ) ;
431431}
432432
433+ // Settings for mocking the GitHub API.
434+ const MOCK_GH_API_SERVER = new Setting ( 'mockGitHubApiServer' , ROOT_SETTING ) ;
435+
433436/**
434437 * A flag indicating whether to enable a mock GitHub API server.
435438 */
436- const MOCK_GH_API_SERVER = new Setting ( 'mockGitHubApiServer' , REMOTE_QUERIES_SETTING ) ;
439+ const MOCK_GH_API_SERVER_ENABLED = new Setting ( 'enabled' , MOCK_GH_API_SERVER ) ;
440+
441+ /**
442+ * A path to a directory containing test scenarios. If this setting is not set,
443+ * the mock server will a default location for test scenarios in dev mode, and
444+ * will show a menu to select a directory in production mode.
445+ */
446+ const MOCK_GH_API_SERVER_SCENARIOS_PATH = new Setting ( 'scenariosPath' , MOCK_GH_API_SERVER ) ;
437447
438448export interface MockGitHubApiConfig {
439449 mockServerEnabled : boolean ;
450+ mockScenariosPath : string ;
440451 onDidChangeConfiguration : Event < void > ;
441452}
442453
@@ -446,11 +457,13 @@ export class MockGitHubApiConfigListener extends ConfigListener implements MockG
446457 }
447458
448459 public get mockServerEnabled ( ) : boolean {
449- return ! ! MOCK_GH_API_SERVER . getValue < boolean > ( ) ;
460+ return ! ! MOCK_GH_API_SERVER_ENABLED . getValue < boolean > ( ) ;
450461 }
451- }
452462
453- const MOCK_GH_API_SERVER_SCENARIOS_PATH = new Setting ( 'mockGitHubApiServerScenariosPath' , REMOTE_QUERIES_SETTING ) ;
463+ public get mockScenariosPath ( ) : string {
464+ return MOCK_GH_API_SERVER_SCENARIOS_PATH . getValue < string > ( ) ;
465+ }
466+ }
454467
455468export function getMockGitHubApiServerScenariosPath ( ) : string | undefined {
456469 return MOCK_GH_API_SERVER_SCENARIOS_PATH . getValue < string > ( ) ;
0 commit comments