Skip to content

Commit 00343ef

Browse files
authored
feat(mongodb-runner): add isClosed getter for MongoCluster (#121)
1 parent f9db8df commit 00343ef

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

packages/mongodb-runner/src/mongocluster.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@ export class MongoCluster {
3737
};
3838
}
3939

40+
isClosed(): boolean {
41+
return this.servers.length === 0 && this.shards.length === 0;
42+
}
43+
4044
static async deserialize(serialized: any): Promise<MongoCluster> {
4145
const cluster = new MongoCluster();
4246
cluster.topology = serialized.topology;

0 commit comments

Comments
 (0)