/**
 * This file contains a set of fragile mocks of vscode API objects. They allow us to run Jest-based unit tests for our
 * own code.
 * These are only used for unit tests. Integration tests are executed using the official extension test runner.
 */ import type { Event as EventType , EventEmitter as EventEmitterType , Uri as UriType } from 'vscode' ; export class Position { constructor ( readonly line , readonly character ) { } } export class EventEmitter < T > implements EventEmitterType < T > { private listeners : ( ( data : T ) => void ) [ ] = [ ] ; event : EventType < T > = ( listener ) => { this . listeners . push ( listener ) ; return new Disposable ( ( ) => { } ) ; } ; /**
     * Notify all subscribers of the  EventEmitter . event . Failure
     * of one or more listener will not fail this function call.
     *
     *  param data fire ( data ) { for ( const listener of this . listeners ) { listener ( data ) ; } } /**
     * Dispose this object and free resources.
     */ dispose ( ) { } } export class Disposable { param disposableLikes return static from ( ... disposableLikes ) { return new Disposable ( ( ) => { } ) ; } param callOnDispose constructor ( callOnDispose ) { } /**
     * Dispose this object.
     */ dispose ( ) { } } export class Uri implements UriType { static parse ( value , strict ? ) { return new Uri ( '' , '' , value , '' , '' ) ; } static file ( path ) { return new Uri ( '' , '' , path , '' , '' ) ; } static joinPath ( base , ... pathSegments ) { return new Uri ( '' , '' , '' , '' , '' ) ; } static from ( { scheme , authority = '' , path = '' , query = '' , fragment = '' , } ) { return new Uri ( scheme , authority , path , query , fragment ) ; } private constructor ( readonly scheme , readonly authority , readonly path , readonly query , readonly fragment ) { } readonly fsPath : string = '' ; with ( { scheme , authority , path , query , fragment , } ) { return new Uri ( scheme || this . scheme , authority || this . authority , path || this . path , query || this . query , fragment || this . fragment ) ; } toString ( skipEncoding ? ) { return `${ this . scheme }${ this . authority }${ this . path }${ this . query }${ this . fragment }` ; } toJSON ( ) { return { scheme : this . scheme , authority : this . authority , path : this . path , query : this . query , fragment : this . fragment , } ; } }