Skip to content

Commit

Permalink
chore: vitest version up (#533)
Browse files Browse the repository at this point in the history
  • Loading branch information
ssi02014 authored Oct 25, 2024
1 parent f3dbad6 commit b804e25
Show file tree
Hide file tree
Showing 44 changed files with 892 additions and 13 deletions.
454 changes: 450 additions & 4 deletions .pnp.cjs

Large diffs are not rendered by default.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
4 changes: 2 additions & 2 deletions packages/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"@types/react": "^18.2.20",
"@types/react-dom": "^18.2.7",
"@types/ua-parser-js": "^0.7.39",
"@vitest/coverage-istanbul": "^1.5.2",
"@vitest/coverage-istanbul": "^2.1.3",
"classnames": "^2.5.1",
"esbuild": "^0.24.0",
"jsdom": "^25.0.0",
Expand All @@ -56,7 +56,7 @@
"typescript": "^5.1.6",
"typescript-plugin-css-modules": "^5.1.0",
"ua-parser-js": "^1.0.38",
"vitest": "^1.5.0"
"vitest": "^2.1.3"
},
"peerDependencies": {
"react": "^18.0.0",
Expand Down
4 changes: 3 additions & 1 deletion packages/react/src/hooks/useToggle/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ import { useToggleState } from '../useToggleState';
* setValue(true);
* isToggled; // true
*/
export function useToggle(defaultValue = false): [boolean, () => void] {
export function useToggle(
defaultValue: boolean = false
): [boolean, () => void] {
return useToggleState(defaultValue, !defaultValue);
}
4 changes: 3 additions & 1 deletion packages/react/vitest.config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/// <reference types="vitest" />
import { defineConfig } from 'vitest/config';
import { coverageConfigDefaults, defineConfig } from 'vitest/config';
import packageJson from './package.json';

export default defineConfig({
Expand All @@ -14,7 +14,9 @@ export default defineConfig({
exclude: [
'src/utils/test/**',
'src/**/internal.ts',
'src/**/*.utils.ts',
'src/hooks/useClipboard',
...coverageConfigDefaults.exclude,
],
},
},
Expand Down
Loading

0 comments on commit b804e25

Please sign in to comment.