import * as chai from 'chai' ; import { TestUtil } from '../TestUtil' ; import { RepositoryRegistry } from '../../extension/registries/RepositoryRegistry' ; import { RepositoryRegistryEntry } from '../../extension/registries/RepositoryRegistryEntry' ; chai . should ( ) ; describe ( 'RepositoryRegistryEntry' , ( ) => { const registry = RepositoryRegistry . instance ( ) ; before ( async ( ) => { await TestUtil . setupTests ( ) ; } ) ; beforeEach ( async ( ) => { await registry . clear ( ) ; } ) ; afterEach ( async ( ) => { await registry . clear ( ) ; } ) ; it ( 'should manage repository registry' , async ( ) => { const entry = new RepositoryRegistryEntry ( { name : 'some-repository' , path : '/some/path' } ) ; await registry . getAll ( ) . should . eventually . deep . equal ( [ ] ) ; await registry . add ( entry ) ; await registry . getAll ( ) . should . eventually . deep . equal ( [ entry ] ) ; } ) ; } ) ;