From 3a87410919b9cfeca4b042c79b48270dc8045531 Mon Sep 17 00:00:00 2001 From: Nandor_Czegledi Date: Mon, 8 Jul 2024 17:20:01 +0200 Subject: [PATCH] test: modify docs Closes: INSTUI-4066 --- docs/testing/converting-old-tests.md | 6 +++--- docs/testing/writing-tests.md | 2 +- package.json | 3 ++- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/docs/testing/converting-old-tests.md b/docs/testing/converting-old-tests.md index 6629109341..9a6d3d54b4 100644 --- a/docs/testing/converting-old-tests.md +++ b/docs/testing/converting-old-tests.md @@ -7,11 +7,11 @@ order: 4 ## Converting old tests This guide explains how to convert current InstUI tests written with the `@instructure/ui-test-utils` testing library to -use Jest + React Testing Library. +use Vitest + React Testing Library. -### Running Jest +### Running Vitest -Jest can be run from the project root with the `npm run test:new` command. It's configured in our CI pipeline so pushing a +Vitest can be run from the project root with the `npm run test:vitest` command. It's configured in our CI pipeline so pushing a branch to remote runs these tests together with the legacy tests automatically. ### Adding new tests to a package diff --git a/docs/testing/writing-tests.md b/docs/testing/writing-tests.md index aa6b7a4e5b..723905d5c7 100644 --- a/docs/testing/writing-tests.md +++ b/docs/testing/writing-tests.md @@ -5,7 +5,7 @@ order: 3 --- > This section uses [`@instructure/ui-test-utils`](/#ui-test-utils) testing library which will be sunset in our next -> release in favor of Jest + React Testing Library. See [our guide](/#converting-old-tests) on how to convert legacy tests to use the new +> release in favor of Vitest + React Testing Library. See [our guide](/#converting-old-tests) on how to convert legacy tests to use the new > frameworks. ## The anatomy of a test diff --git a/package.json b/package.json index 6a8acaa142..b507b8c2c5 100644 --- a/package.json +++ b/package.json @@ -27,7 +27,8 @@ "test": "ui-scripts test --randomize", "test:jest": "lerna run test:jest --stream", "cy:component": "cypress run --component", - "test:vitest": "vitest", + "test:vitest": "vitest --watch=false", + "test:vitest-watch": "vitest", "lint": "lerna run lint --stream", "lint:changes": "npm run lint -- --since HEAD^", "lint:fix": "lerna run lint:fix --stream",