@@ -10,7 +10,8 @@ import { QlPack, runRemoteQuery } from '../../../remote-queries/run-remote-query
1010import { Credentials } from '../../../authentication' ;
1111import { CliVersionConstraint , CodeQLCliServer } from '../../../cli' ;
1212import { CodeQLExtensionInterface } from '../../../extension' ;
13- import { setRemoteControllerRepo , setRemoteRepositoryLists , setVariantAnalysisLiveResultsEnabled } from '../../../config' ;
13+ import { setRemoteControllerRepo , setRemoteRepositoryLists } from '../../../config' ;
14+ import * as config from '../../../config' ;
1415import { UserCancellationException } from '../../../commandRunner' ;
1516import * as ghApiClient from '../../../remote-queries/gh-api/gh-api-client' ;
1617import { lte } from 'semver' ;
@@ -31,6 +32,7 @@ describe('Remote queries', function() {
3132 let progress : sinon . SinonSpy ;
3233 let showQuickPickSpy : sinon . SinonStub ;
3334 let getRepositoryFromNwoStub : sinon . SinonStub ;
35+ let liveResultsStub : sinon . SinonStub ;
3436
3537 // use `function` so we have access to `this`
3638 beforeEach ( async function ( ) {
@@ -70,6 +72,8 @@ describe('Remote queries', function() {
7072 // always run in the vscode-codeql repo
7173 await setRemoteControllerRepo ( 'github/vscode-codeql' ) ;
7274 await setRemoteRepositoryLists ( { 'vscode-codeql' : [ 'github/vscode-codeql' ] } ) ;
75+
76+ liveResultsStub = sandbox . stub ( config , 'isVariantAnalysisLiveResultsEnabled' ) . returns ( false ) ;
7377 } ) ;
7478
7579 afterEach ( async ( ) => {
@@ -281,11 +285,7 @@ describe('Remote queries', function() {
281285
282286 describe ( 'when live results are enabled' , ( ) => {
283287 beforeEach ( async ( ) => {
284- await setVariantAnalysisLiveResultsEnabled ( true ) ;
285- } ) ;
286-
287- afterEach ( async ( ) => {
288- await setVariantAnalysisLiveResultsEnabled ( false ) ;
288+ liveResultsStub . returns ( true ) ;
289289 } ) ;
290290
291291 it ( 'should run a variant analysis that is part of a qlpack' , async ( ) => {
0 commit comments