Skip to content

Commit bfddcab

Browse files
committed
fix: add try/catch to stopping helia
1 parent f3d0430 commit bfddcab

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

examples/js-libp2p-example-delegated-routing/test/index.spec.js

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,17 @@ test.describe('delegated routing example:', () => {
6161
}, {})
6262

6363
test.afterAll(async () => {
64-
await fastify.close()
65-
await helia.stop()
64+
try {
65+
await fastify?.close()
66+
} catch (err) {
67+
console.error('error stopping fastify', err)
68+
}
69+
70+
try {
71+
await helia?.stop()
72+
} catch (err) {
73+
console.error('error stopping helia', err)
74+
}
6675
})
6776

6877
test.beforeEach(async ({ page }) => {

0 commit comments

Comments
 (0)