@analogjs/vitest-angular 1.6.4 → 1.7.0-beta.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +22 -2
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -30,9 +30,29 @@ With Yarn:
|
|
|
30
30
|
yarn install @analogjs/vitest-angular vitest --dev
|
|
31
31
|
```
|
|
32
32
|
|
|
33
|
-
## Setup
|
|
33
|
+
## Automated Setup Using a Schematic
|
|
34
34
|
|
|
35
|
-
|
|
35
|
+
A schematic can be used to setup Vitest in an existing Angular project:
|
|
36
|
+
|
|
37
|
+
Install the `@analogjs/platform` package:
|
|
38
|
+
|
|
39
|
+
```sh
|
|
40
|
+
npm i @analogjs/platform --save-dev
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
Run the schematic to install Vitest, and update the `test` builder:
|
|
44
|
+
|
|
45
|
+
```sh
|
|
46
|
+
npx ng generate @analogjs/platform:setup-vitest --project [your-project-name]
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## Manual Setup
|
|
50
|
+
|
|
51
|
+
Vitest can be setup manually also using the steps below.
|
|
52
|
+
|
|
53
|
+
### Setup for Running Tests in Node
|
|
54
|
+
|
|
55
|
+
To setup Vitest, create a `vite.config.mts` at the root of your project:
|
|
36
56
|
|
|
37
57
|
```ts
|
|
38
58
|
/// <reference types="vitest" />
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@analogjs/vitest-angular",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.7.0-beta.10",
|
|
4
4
|
"description": "Vitest Builder for Angular",
|
|
5
5
|
"type": "commonjs",
|
|
6
6
|
"author": "Brandon Roberts <robertsbt@gmail.com>",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"save": "devDependencies"
|
|
30
30
|
},
|
|
31
31
|
"peerDependencies": {
|
|
32
|
-
"@analogjs/vite-plugin-angular": "
|
|
32
|
+
"@analogjs/vite-plugin-angular": "*",
|
|
33
33
|
"@angular-devkit/architect": "^0.1500.0 || ^0.1600.0 || ^0.1700.0 || ^0.1800.0",
|
|
34
34
|
"vitest": "^1.3.1"
|
|
35
35
|
},
|