Skip to content

Commit

Permalink
chore: scaffold initial vitest tests
Browse files Browse the repository at this point in the history
Signed-off-by: Fernando Fernández <[email protected]>
  • Loading branch information
ferferga committed Jan 24, 2025
1 parent ea9168d commit 3d75ebe
Show file tree
Hide file tree
Showing 7 changed files with 211 additions and 44 deletions.
1 change: 0 additions & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@
"@vitejs/plugin-vue": "5.2.1",
"browserslist": "4.24.4",
"lightningcss": "1.28.2",
"storybook": "8.5.1",
"unocss": "0.65.4",
"unplugin-vue-components": "28.0.0",
"unplugin-vue-router": "0.10.9",
Expand Down
51 changes: 12 additions & 39 deletions package-lock.json

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

2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,10 @@
"@types/node": "22.10.5",
"eslint": "9.17.0",
"jiti": "2.4.2",
"storybook": "8.5.1",
"type-fest": "4.31.0",
"typescript": "5.7.2",
"vitest": "3.0.4",
"vue-tsc": "2.2.0"
}
}
6 changes: 4 additions & 2 deletions packages/shared/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,12 @@
"lint": "eslint . --flag unstable_ts_config",
"lint:fix": "eslint . --fix --flag unstable_ts_config",
"lint:inspect": "eslint-config-inspector",
"check:types": "vue-tsc"
"check:types": "vue-tsc",
"test": "vitest run"
},
"devDependencies": {
"@jellyfin-vue/configs": "*"
"@jellyfin-vue/configs": "*",
"vitest": "3.0.4"
},
"dependencies": {
"dompurify": "3.2.3",
Expand Down
2 changes: 1 addition & 1 deletion packages/shared/src/validation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export function isNil(value: unknown): value is null | undefined {
* Check if the value is an object.
*/
export function isObj(value: unknown): value is object {
return typeof value === 'object' && !isNull(value);
return typeof value === 'object' && !isNull(value) && !isArray(value);
}

/**
Expand Down
Loading

0 comments on commit 3d75ebe

Please sign in to comment.