@analogjs/vitest-angular 2.0.0-alpha.17 → 2.0.0-alpha.19
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 +12 -15
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -88,14 +88,14 @@ Next, define a `src/test-setup.ts` file to setup the `TestBed`:
|
|
|
88
88
|
import '@analogjs/vitest-angular/setup-zone';
|
|
89
89
|
|
|
90
90
|
import {
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
} from '@angular/platform-browser
|
|
91
|
+
BrowserTestingModule,
|
|
92
|
+
platformBrowserTesting,
|
|
93
|
+
} from '@angular/platform-browser/testing';
|
|
94
94
|
import { getTestBed } from '@angular/core/testing';
|
|
95
95
|
|
|
96
96
|
getTestBed().initTestEnvironment(
|
|
97
|
-
|
|
98
|
-
|
|
97
|
+
BrowserTestingModule,
|
|
98
|
+
platformBrowserTesting(),
|
|
99
99
|
);
|
|
100
100
|
```
|
|
101
101
|
|
|
@@ -104,24 +104,21 @@ If you are using `Zoneless` change detection, use the following setup:
|
|
|
104
104
|
```ts
|
|
105
105
|
import '@analogjs/vitest-angular/setup-snapshots';
|
|
106
106
|
|
|
107
|
+
import { provideZonelessChangeDetection, NgModule } from '@angular/core';
|
|
107
108
|
import {
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
} from '@angular/
|
|
111
|
-
import {
|
|
112
|
-
BrowserDynamicTestingModule,
|
|
113
|
-
platformBrowserDynamicTesting,
|
|
114
|
-
} from '@angular/platform-browser-dynamic/testing';
|
|
109
|
+
BrowserTestingModule,
|
|
110
|
+
platformBrowserTesting,
|
|
111
|
+
} from '@angular/platform-browser/testing';
|
|
115
112
|
import { getTestBed } from '@angular/core/testing';
|
|
116
113
|
|
|
117
114
|
@NgModule({
|
|
118
|
-
providers: [
|
|
115
|
+
providers: [provideZonelessChangeDetection()],
|
|
119
116
|
})
|
|
120
117
|
export class ZonelessTestModule {}
|
|
121
118
|
|
|
122
119
|
getTestBed().initTestEnvironment(
|
|
123
|
-
[
|
|
124
|
-
|
|
120
|
+
[BrowserTestingModule, ZonelessTestModule],
|
|
121
|
+
platformBrowserTesting(),
|
|
125
122
|
);
|
|
126
123
|
```
|
|
127
124
|
|