feat(shared/lib): add cn utility (clsx + tailwind-merge)

This commit is contained in:
Ilia Mashkov
2026-03-06 23:10:52 +03:00
parent a57fea4590
commit 53b9a8bf7a
5 changed files with 62 additions and 0 deletions

34
vitest.unit.config.ts Normal file
View File

@@ -0,0 +1,34 @@
import path from "node:path";
import { fileURLToPath } from "node:url";
import { svelte } from "@sveltejs/vite-plugin-svelte";
import { defineConfig } from "vitest/config";
const dirname =
typeof __dirname !== "undefined"
? __dirname
: path.dirname(fileURLToPath(import.meta.url));
export default defineConfig({
plugins: [
svelte({
hot: !process.env.VITEST,
}),
],
test: {
globals: true,
environment: "jsdom",
setupFiles: ["./src/tests/setup.ts"],
include: ["src/**/*.{test,spec}.{js,ts}"],
exclude: ["src/tests/e2e/**/*.{test,spec}.{js,ts}"],
},
resolve: {
alias: {
$lib: path.resolve("./src/lib"),
$shared: path.resolve("./src/shared"),
$pages: path.resolve("./src/pages"),
$features: path.resolve("./src/features"),
$entities: path.resolve("./src/entities"),
$widgets: path.resolve("./src/widgets"),
},
},
});