import { expect } from 'chai' ; import * as vscode from 'vscode' ; const PERFECT_MATCH = 10 ; async function matchExtensionAsHtml ( extension ) { const doc = await vscode . workspace . openTextDocument ( vscode . Uri . parse ( `untitled:fake/path/doc.${ extension }` ) ) ; expect ( vscode . languages . match ( { language : 'visualforce' } , doc ) ) . to . equal ( PERFECT_MATCH ) ; } describe ( 'Visualforce file association' , ( ) => { it ( 'Should support .page association' , async ( ) => { await matchExtensionAsHtml ( '.page' ) ; } ) ; it ( 'Should support .component association' , async ( ) => { await matchExtensionAsHtml ( '.component' ) ; } ) ; } ) ;