Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ node_modules/
.env
.npmrc
dist/
coverage/
2 changes: 2 additions & 0 deletions index.test.js → index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,14 @@ test("should toggle by given value", () => {
expect(result.current.isOpen).toBe(true);

act(() => {
// @ts-expect-error we expect TypeScript to break on that one, as we do not allow null in types
result.current.toggle(null);
});

expect(result.current.isOpen).toBe(false);

act(() => {
// @ts-expect-error this should not be valid for TS, but we expect JS to handle a string as `true`
result.current.toggle("true");
});

Expand Down
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
"dev": "tsup index.ts --format esm,cjs --dts --watch",
"build": "tsup index.ts --format esm,cjs --dts --minify",
"test": "vitest --no-watch",
"test:coverage": "vitest --coverage",
"test:watch": "vitest"
},
"peerDependencies": {
Expand All @@ -32,6 +33,7 @@
"devDependencies": {
"@testing-library/react": "16.2.0",
"@types/react": "19.0.11",
"@vitest/coverage-v8": "3.0.9",
"all-contributors-cli": "6.26.1",
"auto": "11.3.0",
"jsdom": "26.0.0",
Expand Down
144 changes: 144 additions & 0 deletions pnpm-lock.yaml

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

Loading