diff --git a/package-lock.json b/package-lock.json index f03e10d..35abd94 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@socket.io/mongo-adapter", - "version": "0.3.0", + "version": "0.3.2", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@socket.io/mongo-adapter", - "version": "0.3.0", + "version": "0.3.2", "license": "MIT", "dependencies": { "debug": "~4.3.1", @@ -2359,9 +2359,9 @@ } }, "node_modules/socket.io": { - "version": "4.7.3", - "resolved": "https://registry.npmjs.org/socket.io/-/socket.io-4.7.3.tgz", - "integrity": "sha512-SE+UIQXBQE+GPG2oszWMlsEmWtHVqw/h1VrYJGK5/MC7CH5p58N448HwIrtREcvR4jfdOJAY4ieQfxMr55qbbw==", + "version": "4.7.5", + "resolved": "https://registry.npmjs.org/socket.io/-/socket.io-4.7.5.tgz", + "integrity": "sha512-DmeAkF6cwM9jSfmp6Dr/5/mfMwb5Z5qRrSXLpo3Fq5SqyU8CMF15jIN4ZhfSwu35ksM1qmHZDQ/DK5XTccSTvA==", "dev": true, "dependencies": { "accepts": "~1.3.4", @@ -4708,9 +4708,9 @@ "peer": true }, "socket.io": { - "version": "4.7.3", - "resolved": "https://registry.npmjs.org/socket.io/-/socket.io-4.7.3.tgz", - "integrity": "sha512-SE+UIQXBQE+GPG2oszWMlsEmWtHVqw/h1VrYJGK5/MC7CH5p58N448HwIrtREcvR4jfdOJAY4ieQfxMr55qbbw==", + "version": "4.7.5", + "resolved": "https://registry.npmjs.org/socket.io/-/socket.io-4.7.5.tgz", + "integrity": "sha512-DmeAkF6cwM9jSfmp6Dr/5/mfMwb5Z5qRrSXLpo3Fq5SqyU8CMF15jIN4ZhfSwu35ksM1qmHZDQ/DK5XTccSTvA==", "dev": true, "requires": { "accepts": "~1.3.4", diff --git a/test/connection-state-recovery.ts b/test/connection-state-recovery.ts index 57fb411..105324c 100644 --- a/test/connection-state-recovery.ts +++ b/test/connection-state-recovery.ts @@ -58,12 +58,7 @@ describe("connection state recovery", () => { }); afterEach(async () => { - servers.forEach((server) => { - // @ts-ignore - server.httpServer.close(); - server.of("/").adapter.close(); - server.of("/foo").adapter.close(); - }); + servers.forEach((server) => server.close()); await mongoClient.close(); }); @@ -267,12 +262,7 @@ describe("connection state recovery", () => { }); afterEach(async () => { - servers.forEach((server) => { - // @ts-ignore - server.httpServer.close(); - server.of("/").adapter.close(); - server.of("/foo").adapter.close(); - }); + servers.forEach((server) => server.close()); await mongoClient.close(); }); diff --git a/test/index.ts b/test/index.ts index b4fdb0a..304c4a1 100644 --- a/test/index.ts +++ b/test/index.ts @@ -57,14 +57,8 @@ describe("@socket.io/mongodb-adapter", () => { }); afterEach(async () => { - servers.forEach((server) => { - // @ts-ignore - server.httpServer.close(); - server.of("/").adapter.close(); - }); - clientSockets.forEach((socket) => { - socket.disconnect(); - }); + servers.forEach((server) => server.close()); + clientSockets.forEach((socket) => socket.disconnect()); await mongoClient.close(); }); @@ -85,10 +79,7 @@ describe("@socket.io/mongodb-adapter", () => { }); it("broadcasts to all clients in a namespace", (done) => { - const partialDone = times(3, () => { - servers.forEach((server) => server.of("/custom").adapter.close()); - done(); - }); + const partialDone = times(3, done); servers.forEach((server) => server.of("/custom"));