Skip to content

Commit

Permalink
Update melt (#186)
Browse files Browse the repository at this point in the history
  • Loading branch information
huntabyte authored Nov 16, 2023
1 parent 745a080 commit 82355cd
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 8 deletions.
5 changes: 5 additions & 0 deletions .changeset/nine-doors-drop.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"bits-ui": patch
---

Update melt
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
"types": "./dist/index.d.ts",
"type": "module",
"dependencies": {
"@melt-ui/svelte": "0.61.1",
"@melt-ui/svelte": "0.61.2",
"nanoid": "^5.0.3"
},
"peerDependencies": {
Expand Down
14 changes: 7 additions & 7 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions src/tests/select/Select.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,14 @@ describe("Select", () => {
expect(input).not.toBeVisible();
});

it.each([kbd.SPACE, kbd.ENTER])("selects item with the %s key", async (key) => {
const { user, queryByTestId, getByTestId } = await open();
await user.keyboard(kbd.ARROW_DOWN);
await user.keyboard(key);
await waitFor(() => expect(queryByTestId("content")).toBeNull());
expect(getByTestId("value")).toHaveTextContent("A");
});

it("syncs the name prop to the hidden input", async () => {
const { input } = setup({ name: "test" });
expect(input).toHaveAttribute("name", "test");
Expand Down

0 comments on commit 82355cd

Please sign in to comment.