diff --git a/.github/workflows/release.workflow.yml b/.github/workflows/release.workflow.yml index a47dca7..6b40ac5 100644 --- a/.github/workflows/release.workflow.yml +++ b/.github/workflows/release.workflow.yml @@ -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" diff --git a/package.json b/package.json index 3da76af..facf7a4 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/tests/integration.test.ts b/tests/integration.test.ts index ccfa772..0ddce10 100644 --- a/tests/integration.test.ts +++ b/tests/integration.test.ts @@ -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; @@ -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];