From 05e1730f2e4daa78ce85fbe45c7a3159f9715bfd Mon Sep 17 00:00:00 2001 From: Darshan Date: Mon, 24 Nov 2025 11:51:00 +0530 Subject: [PATCH] refactor: test script names. --- .github/workflows/e2e.yml | 2 +- CONTRIBUTING.md | 10 ++++------ package.json | 11 ++++++----- 3 files changed, 11 insertions(+), 12 deletions(-) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index c1be74f27..4429e5089 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -33,7 +33,7 @@ jobs: run: bunx playwright install --with-deps chromium - name: E2E Tests - run: bun run e2e + run: bun test:e2e - uses: actions/upload-artifact@v4 if: ${{ !cancelled() }} with: diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index e06936e6e..027376acc 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -56,7 +56,7 @@ cd appwrite-console && bun install When you run the Appwrite Console locally, it needs to point to a backend as well. The easiest way to do this is to run an Appwrite instance locally. -Follow the [install instructions](https://appwrite.io/docs/advanced/self-hosting) in the Appwrite docs. +Follow the [installation instructions](https://appwrite.io/docs/advanced/self-hosting) in the Appwrite docs. ### 4. Setup environment variables @@ -85,7 +85,7 @@ bun run build ### Tests ```bash -bun test:unit +bun tests ``` This will run tests in the `tests/` directory. @@ -177,10 +177,8 @@ Before committing always make sure to run all available tools to improve the cod - Formatter - `bun format` -- Tests (Unit) - - `bun test:unit` -- Tests (E2E) - - `bun e2e` +- Tests + - `bun tests` - Diagnostics - `bun check` diff --git a/package.json b/package.json index 37b1b02ec..c79a6be56 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "type": "module", "scripts": { "dev": "vite dev", - "build": "node build.js", + "build": "bun run build.js", "preview": "vite preview", "prepare": "svelte-kit sync || echo ''", "clean": "rm -rf node_modules && rm -rf .svelte_kit && bun install --force", @@ -11,11 +11,12 @@ "check:watch": "svelte-check --tsconfig ./tsconfig.json --watch", "format": "prettier --write --cache .", "lint": "prettier --check . && eslint .", + "tests": "bun run test:unit && bun run test:e2e", "test:unit": "TZ=EST vitest run", "test:unit-ui": "TZ=EST vitest --ui", - "test:watch": "TZ=EST vitest watch", - "e2e": "playwright test", - "e2e:ui": "playwright test --ui" + "test:unit-watch": "TZ=EST vitest watch", + "test:e2e": "playwright test", + "test:e2e-ui": "playwright test --ui" }, "dependencies": { "@ai-sdk/svelte": "^1.1.24", @@ -91,5 +92,5 @@ "overrides": { "vite": "npm:rolldown-vite@latest" }, - "packageManager": "bun@1.3.2" + "packageManager": "bun@1.3.3" }