Skip to content

Commit c35444d

Browse files
committed
Add usedDatabaseSize to stats type
1 parent 0a0217e commit c35444d

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

src/types.ts

+1
Original file line numberDiff line numberDiff line change
@@ -789,6 +789,7 @@ export type IndexStats = {
789789

790790
export type Stats = {
791791
databaseSize: number;
792+
usedDatabaseSize: number;
792793
lastUpdate: string;
793794
indexes: {
794795
[index: string]: IndexStats;

tests/client.test.ts

+1
Original file line numberDiff line numberDiff line change
@@ -547,6 +547,7 @@ describe.each([{ permission: "Master" }, { permission: "Admin" }])(
547547
const client = await getClient(permission);
548548
const response: Stats = await client.getStats();
549549
expect(response).toHaveProperty("databaseSize", expect.any(Number));
550+
expect(response).toHaveProperty("usedDatabaseSize", expect.any(Number));
550551
expect(response).toHaveProperty("lastUpdate"); // TODO: Could be null, find out why
551552
expect(response).toHaveProperty("indexes", expect.any(Object));
552553
});

0 commit comments

Comments
 (0)