We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d8d280d commit 18c76d5Copy full SHA for 18c76d5
1 file changed
jest.setup.redis-mock.js
@@ -21,5 +21,17 @@ beforeAll(async () => {
21
);
22
23
afterAll(async () => {
24
- await redisTestContainer.stop();
25
-});
+ if (redisTestContainer) {
+ try {
26
+ await redisTestContainer.stop();
27
+ } catch (error) {
28
+ // Ignore errors when stopping container
29
+ // Container might already be stopped or not started
30
+ }
31
32
+
33
+ /**
34
+ * Clear REDIS_URL to prevent further connection attempts
35
+ */
36
+ delete process.env.REDIS_URL;
37
+}, 30000);
0 commit comments