Skip to content

Commit

Permalink
fix: batch status filter
Browse files Browse the repository at this point in the history
  • Loading branch information
UnderKoen committed May 9, 2024
1 parent 2db77de commit 2b0e209
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 7 deletions.
7 changes: 0 additions & 7 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
name: Test
on:
push:
branches:
- main
- next
paths-ignore:
- "docs/**"
- "**/*.md"
pull_request:
paths-ignore:
- "docs/**"
Expand Down
24 changes: 24 additions & 0 deletions test/PrintOne.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1899,4 +1899,28 @@ describe("getBatches", function () {
]),
);
});

it("should use the status filter (single)", async function () {
// arrange

// act
const batches = await client.getBatches({
limit: 1,
filter: {
status: [BatchStatus.batch_user_ready],
},
});
const batch = batches.data[0];

if (batch === undefined) {
console.warn("No batches found, skipping test");
return;
}

// assert
expect(batch).toBeDefined();
expect(batch.status).toEqual(
expect.toBeOneOf([BatchStatus.batch_user_ready]),
);
});
});

0 comments on commit 2b0e209

Please sign in to comment.