Skip to content

Commit

Permalink
fix(next-drupal)!: upgrade tests to new async request objects
Browse files Browse the repository at this point in the history
  • Loading branch information
yobottehg committed Dec 6, 2024
1 parent fea2caf commit 4c30157
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/next-drupal/tests/draft/draft.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ describe("getDraftData()", () => {
const draftModeStore = await draftMode()
cookieStore.set(draftDataCookie)

const data = getDraftData()
const data = await getDraftData()
expect(draftModeStore.isEnabled).toBe(false)
expect(cookieStore.has).toHaveBeenCalledTimes(0)
expect(cookieStore.get).toHaveBeenCalledTimes(0)
Expand Down Expand Up @@ -203,7 +203,7 @@ describe("getDraftData()", () => {
})
draftModeStore.enable()

const data = getDraftData()
const data = await getDraftData()
expect(draftModeStore).toHaveBeenCalledTimes(1)
expect(draftModeStore.isEnabled).toBe(true)
expect(cookiesStore.has).toHaveBeenCalledWith(DRAFT_DATA_COOKIE_NAME)
Expand Down

0 comments on commit 4c30157

Please sign in to comment.