File tree Expand file tree Collapse file tree
test/pure-tests/databases/config Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ import * as fs from "fs-extra";
22import * as path from "path" ;
33import { cloneDbConfig , DbConfig } from "./db-config" ;
44import * as chokidar from "chokidar" ;
5- import { DisposableObject } from "../../pure/disposable-object" ;
5+ import { DisposableObject , DisposeHandler } from "../../pure/disposable-object" ;
66import { DbConfigValidator } from "./db-config-validator" ;
77import { ValueResult } from "../../common/value-result" ;
88import { App } from "../../common/app" ;
@@ -38,7 +38,8 @@ export class DbConfigStore extends DisposableObject {
3838 this . watchConfig ( ) ;
3939 }
4040
41- public dispose ( ) : void {
41+ public dispose ( disposeHandler ?: DisposeHandler ) : void {
42+ super . dispose ( disposeHandler ) ;
4243 this . configWatcher ?. unwatch ( this . configPath ) ;
4344 }
4445
Original file line number Diff line number Diff line change @@ -39,6 +39,8 @@ describe("db config store", () => {
3939 expect ( config . databases . local . lists ) . toHaveLength ( 0 ) ;
4040 expect ( config . databases . local . databases ) . toHaveLength ( 0 ) ;
4141 expect ( config . selected ) . toBeUndefined ( ) ;
42+
43+ configStore . dispose ( ) ;
4244 } ) ;
4345
4446 it ( "should load an existing config" , async ( ) => {
@@ -85,6 +87,8 @@ describe("db config store", () => {
8587 kind : "configDefined" ,
8688 value : "path.to.database" ,
8789 } ) ;
90+
91+ configStore . dispose ( ) ;
8892 } ) ;
8993
9094 it ( "should load an existing config without selected db" , async ( ) => {
@@ -104,6 +108,8 @@ describe("db config store", () => {
104108
105109 const config = configStore . getConfig ( ) . value ;
106110 expect ( config . selected ) . toBeUndefined ( ) ;
111+
112+ configStore . dispose ( ) ;
107113 } ) ;
108114
109115 it ( "should not allow modification of the config" , async ( ) => {
@@ -119,5 +125,7 @@ describe("db config store", () => {
119125
120126 const reRetrievedConfig = configStore . getConfig ( ) . value ;
121127 expect ( reRetrievedConfig . databases . remote . repositoryLists ) . toHaveLength ( 1 ) ;
128+
129+ configStore . dispose ( ) ;
122130 } ) ;
123131} ) ;
You can’t perform that action at this time.
0 commit comments