From f4c6de96f8dbf26fd8e611e301129927ce0550e5 Mon Sep 17 00:00:00 2001 From: kunish <17328586+kunish@users.noreply.github.com> Date: Sun, 16 Jul 2023 17:21:18 +0800 Subject: [PATCH] chore: run unite tests before commiting (#172) --- .husky/pre-commit | 1 + package.json | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.husky/pre-commit b/.husky/pre-commit index a5a29d9f..c9965983 100755 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -1,4 +1,5 @@ #!/usr/bin/env sh . "$(dirname -- "$0")/_/husky.sh" +pnpm test run pnpm lint-staged diff --git a/package.json b/package.json index 72902599..017b9186 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,8 @@ "codegen": "graphql-codegen", "dev": "vite dev", "lint": "vite lint", - "prepare": "husky install" + "prepare": "husky install", + "test": "vitest" }, "dependencies": { "@commitlint/cli": "^17.6.6",