@@ -9,12 +9,8 @@ import assert from "assert";
99import * as vscode from "vscode" ;
1010import { endToEndTestSetup } from "../endToEndTestSetup" ;
1111
12- const textBasedThreshold = 100 ;
13- const parseTreeThreshold = 500 ;
14- const surroundingPairThreshold = 25000 ;
15-
16- const content = generateTestData ( ) ;
17- const numLines = content . split ( "\n" ) . length ;
12+ const testData = generateTestData ( ) ;
13+ const numLines = testData . split ( "\n" ) . length ;
1814
1915suite ( `Performance: ${ numLines } lines JSON` , async function ( ) {
2016 endToEndTestSetup ( this ) ;
@@ -29,6 +25,10 @@ suite(`Performance: ${numLines} lines JSON`, async function () {
2925 }
3026 } ) ;
3127
28+ const textBasedThreshold = 100 ;
29+ const parseTreeThreshold = 500 ;
30+ const surroundingPairThreshold = 25000 ;
31+
3232 test (
3333 "Remove token" ,
3434 asyncSafety ( ( ) => removeToken ( textBasedThreshold ) ) ,
@@ -99,7 +99,7 @@ async function selectScopeType(scopeType: ScopeType, threshold: number) {
9999}
100100
101101async function testPerformance ( threshold : number , action : ActionDescriptor ) {
102- const editor = await openNewEditor ( content , { languageId : "json" } ) ;
102+ const editor = await openNewEditor ( testData , { languageId : "json" } ) ;
103103 const position = new vscode . Position ( editor . document . lineCount - 3 , 5 ) ;
104104 const selection = new vscode . Selection ( position , position ) ;
105105 editor . selections = [ selection ] ;
0 commit comments