@@ -209,49 +209,48 @@ suite('Extension Test Suite', () => {
209209 } ) ;
210210
211211 test ( "Lint diagnostics should be ordered by line number" , async function ( ) {
212- this . timeout ( 15000 ) ;
213-
214- const extension = vscode . extensions . getExtension (
215- "sourcemeta.sourcemeta-studio"
216- ) ;
217- if ( extension && ! extension . isActive ) {
218- await extension . activate ( ) ;
219- }
220- const fixtureDir = path . join (
221- __dirname ,
222- ".." ,
223- ".." ,
224- ".." ,
225- "test" ,
226- "vscode" ,
227- "fixtures"
228- ) ;
229- const schemaPath = path . join ( fixtureDir , "lint-order.schema.json" ) ;
230-
231- const document = await vscode . workspace . openTextDocument (
232- vscode . Uri . file ( schemaPath )
233- ) ;
234- await vscode . window . showTextDocument ( document ) ;
235-
236- await vscode . commands . executeCommand ( "sourcemeta-studio.openPanel" ) ;
237-
238- // wait for lint + diagnostics
239- await new Promise ( ( resolve ) => setTimeout ( resolve , 5000 ) ) ;
240-
241- const diagnostics = vscode . languages
242- . getDiagnostics ( document . uri )
243- . filter ( ( d ) => d . source === "Sourcemeta Studio (Lint)" ) ;
244-
245- assert . ok ( diagnostics . length > 1 , "Expected multiple lint diagnostics" ) ;
246-
247- const lineNumbers = diagnostics . map ( ( d ) => d . range . start . line ) ;
248-
249- const sorted = [ ...lineNumbers ] . sort ( ( a , b ) => a - b ) ;
250-
251- assert . deepStrictEqual (
252- lineNumbers ,
253- sorted ,
254- "Lint diagnostics should be sorted by line number"
255- ) ;
256- } ) ;
212+ this . timeout ( 15000 ) ;
213+
214+ const extension = vscode . extensions . getExtension (
215+ "sourcemeta.sourcemeta-studio"
216+ ) ;
217+ if ( extension && ! extension . isActive ) {
218+ await extension . activate ( ) ;
219+ }
220+ const fixtureDir = path . join (
221+ __dirname ,
222+ ".." ,
223+ ".." ,
224+ ".." ,
225+ "test" ,
226+ "vscode" ,
227+ "fixtures"
228+ ) ;
229+ const schemaPath = path . join ( fixtureDir , "lint-order.schema.json" ) ;
230+
231+ const document = await vscode . workspace . openTextDocument (
232+ vscode . Uri . file ( schemaPath )
233+ ) ;
234+ await vscode . window . showTextDocument ( document ) ;
235+
236+ await vscode . commands . executeCommand ( "sourcemeta-studio.openPanel" ) ;
237+
238+ await new Promise ( ( resolve ) => setTimeout ( resolve , 5000 ) ) ;
239+
240+ const diagnostics = vscode . languages
241+ . getDiagnostics ( document . uri )
242+ . filter ( ( d ) => d . source === "Sourcemeta Studio (Lint)" ) ;
243+
244+ assert . ok ( diagnostics . length > 1 , "Expected multiple lint diagnostics" ) ;
245+
246+ const lineNumbers = diagnostics . map ( ( d ) => d . range . start . line ) ;
247+
248+ const sorted = [ ...lineNumbers ] . sort ( ( a , b ) => a - b ) ;
249+
250+ assert . deepStrictEqual (
251+ lineNumbers ,
252+ sorted ,
253+ "Lint diagnostics should be sorted by line number"
254+ ) ;
255+ } ) ;
257256} ) ;
0 commit comments