From: Jonathan Kumar <31934231+jonnykio@users.noreply.github.com> Date: Sat, 15 Feb 2025 18:09:03 +0000 (+0530) Subject: docs: change unit tests references on chore: contributing.md from JEST to VITEST... X-Git-Tag: v4.5.1~23 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1ad847e6669605710decf5a3a851f6f6d5037edf;p=thirdparty%2Fvuejs%2Frouter.git docs: change unit tests references on chore: contributing.md from JEST to VITEST (#2462) --- diff --git a/.github/contributing.md b/.github/contributing.md index 087e09b9..f70cc916 100644 --- a/.github/contributing.md +++ b/.github/contributing.md @@ -52,7 +52,7 @@ A high-level overview of tools used: - [TypeScript](https://www.typescriptlang.org/) as the development language - [Rollup](https://rollupjs.org) for bundling -- [Jest](https://jestjs.io/) for unit testing +- [Vitest](https://vitest.dev/) for unit testing - [Prettier](https://prettier.io/) for code formatting ## Scripts @@ -83,7 +83,7 @@ The `pnpm test` script runs all checks: $ pnpm test # run unit tests in watch mode -$ pnpm jest --watch +$ pnpm test:unit --watch ``` ## Project Structure @@ -102,7 +102,7 @@ Vue Router source code can be found in the `src` directory: ## Contributing Tests -Unit tests are located inside `__tests__`. Consult the [Jest docs](https://jestjs.io/docs/en/using-matchers) and existing test cases for how to write new test specs. Here are some additional guidelines: +Unit tests are located inside `__tests__`. Consult the [Vitest docs](https://vitest.dev/guide/) and existing test cases for how to write new test specs. Here are some additional guidelines: - Use the minimal API needed for a test case. For example, if a test can be written without involving the reactivity system or a component, it should be written so. This limits the test's exposure to changes in unrelated parts and makes it more stable. - Use the minimal API needed for a test case. For example, if a test concerns the `router-link` component, don't create a router instance, mock the required properties instead.