Skip to content

Commit

Permalink
fix: clear queues after finishing client tests
Browse files Browse the repository at this point in the history
  • Loading branch information
CahidArda committed Jun 24, 2024
1 parent f0604aa commit 01f2ea0
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/client/client.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,15 @@ import { Client } from "./client";
describe("E2E Publish", () => {
const client = new Client({ token: process.env.QSTASH_TOKEN! });

afterAll(async () => {
const queueDetails = await client.queue().list();
await Promise.all(
queueDetails.map(async (q) => {
await client.queue({ queueName: q.name }).delete();
})
);
});

test("should publish a json message", async () => {
const result = await client.publishJSON({
url: "https://example.com/",
Expand Down

0 comments on commit 01f2ea0

Please sign in to comment.