Skip to content

Commit

Permalink
fix unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
NFriedo committed Feb 27, 2025
1 parent 5af2e7a commit bf33959
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/modules/data/board/BoardFocusHandler.composable.unit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,17 @@ describe("BoardFocusHandler composable", () => {
});

it("should set focusable values", async () => {
target.value?.focus();
const { isFocusWithin, isFocusContained } = mountComposable(() =>
const { isFocused, isFocusWithin, isFocusContained } = mountComposable(() =>
useBoardFocusHandler(columnId, target)
);

expect(isFocused.value).toBe(false);
expect(isFocusWithin.value).toBe(false);
expect(isFocusContained.value).toBe(false);

target.value.focus();

expect(isFocused.value).toBe(true);
expect(isFocusWithin.value).toBe(true);
expect(isFocusContained.value).toBe(true);
});
Expand Down

0 comments on commit bf33959

Please sign in to comment.