Skip to content

Commit

Permalink
Merge pull request #28 from Boulevard/pat/fix-deploy
Browse files Browse the repository at this point in the history
patching flaky test
  • Loading branch information
patsissons authored Dec 18, 2024
2 parents 5c5825f + 00aeda7 commit e302c0a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
1 change: 1 addition & 0 deletions .github/workflows/release.workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ jobs:
uses: ./.github/actions/install-dependencies
- run: npm test
env:
TZ: "America/Los_Angeles"
SANDBOX_API_KEY: ${{ secrets.SANDBOX_API_KEY }}

- uses: "marvinpinto/action-automatic-releases@latest"
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@boulevard/blvd-book-sdk",
"version": "2.0.3",
"version": "2.0.4",
"description": "A JS client for the Boulevard API",
"main": "lib/blvd.js",
"typings": "lib/blvd.js",
Expand Down
7 changes: 5 additions & 2 deletions tests/integration.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ describe("carts", () => {
test("create and set location", async () => {
const locations = await anon.locations.list();
const cart = await anon.carts.create();

expect(cart).toBeInstanceOf(Cart);
let categories = await cart.getAvailableCategories();
const item = categories[0].availableItems[0] as CartAvailableBookableItem;
Expand Down Expand Up @@ -188,7 +188,10 @@ describe("carts", () => {
cart = await cart.addBookableItem(service as CartAvailableBookableItem);

const dates = await cart.getBookableDates();
const date = dates[0];
// kind of a hack to protect against flaky timezone boundary behaviour
// selects the next day after today, just in case today is too late in the day
// we should always be able to use tomorrow, but just to be safe fallback on today
const date = dates[1] || dates[0];

const times = await cart.getBookableTimes(date);
const time = times[0];
Expand Down

0 comments on commit e302c0a

Please sign in to comment.