Skip to content

Commit

Permalink
test: modify docs
Browse files Browse the repository at this point in the history
Closes: INSTUI-4066
  • Loading branch information
git-nandor committed Jul 10, 2024
1 parent 7d3fa3c commit 18eaa3e
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
6 changes: 3 additions & 3 deletions docs/testing/converting-old-tests.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion docs/testing/writing-tests.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 18eaa3e

Please sign in to comment.