import { expect } from 'chai' ; import { ActivityBar , ExtensionsViewItem , ExtensionsViewSection } from 'vscode-extension-tester' ; const pjson = require ( '../../package.json' ) ; describe ( 'Example extension view tests' , ( ) => { let helloExtension ; before ( async function ( ) { this . timeout ( 15000 ) ; const view = await ( await new ActivityBar ( ) . getViewControl ( 'Extensions' ) ) ?. openView ( ) ; const extensions = await view ?. getContent ( ) . getSection ( 'Installed' ) as ExtensionsViewSection ; helloExtension = await extensions . findItem ( `@installed ${ pjson . displayName }` ) as ExtensionsViewItem ; } ) ; it ( 'Check the extension info' , async ( ) => { const author = await helloExtension . getAuthor ( ) ; const desc = await helloExtension . getDescription ( ) ; const version = await helloExtension . getVersion ( ) ; expect ( author ) . equals ( pjson . publisher ) ; expect ( desc ) . equals ( pjson . description ) ; expect ( version ) . equals ( pjson . version ) ; } ) ; } ) ;