import { CancellationToken , CodeLens , CodeLensProvider , EventEmitter , ExtensionContext , languages , TextDocument } from 'vscode' ; import { LWC_TEST_DOCUMENT_SELECTOR } from '../types/constants' ; import { provideLwcTestCodeLens } from './provideLwcTestCodeLens' ; /**
 * Code Lens Provider providing "Run Test" and "Debug Test" code lenses in LWC tests.
 */ class LwcTestCodeLensProvider implements CodeLensProvider { private onDidChangeCodeLensesEventEmitter = new EventEmitter < void > ( ) ; public onDidChangeCodeLenses = this . onDidChangeCodeLensesEventEmitter . event ; /**
     * Refresh code lenses
     */ public refresh ( ) { this . onDidChangeCodeLensesEventEmitter . fire ( ) ; } param document param token public async provideCodeLenses ( document , token ) { return provideLwcTestCodeLens ( document , token ) ; } } export const lwcTestCodeLensProvider = new LwcTestCodeLensProvider ( ) ; param context export function registerLwcTestCodeLensProvider ( context ) { context . subscriptions . push ( languages . registerCodeLensProvider ( LWC_TEST_DOCUMENT_SELECTOR , lwcTestCodeLensProvider ) ) ; }