You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: apps/astro-docs/src/content/docs/blog/v2.mdx
+42Lines changed: 42 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -32,6 +32,7 @@ Consequently, even though the surface-level APIs of v1 and v2 are similar, as bo
32
32
- Better composability 🧩
33
33
- Better `Portal` powered components 🪞
34
34
- Improved documentation 📖
35
+
- Testing (Experimental) 🧪
35
36
36
37
While this list might seem modest at first glance, the core improvements in Angular Three v2 unlock a wealth of potential that has been incorporated into other packages like `angular-three-soba`, `angular-three-cannon`, and `angular-three-postprocessing`.
37
38
@@ -374,6 +375,47 @@ Angular Three v2 documentation is powered by [Starlight](https://starlight.astro
374
375
375
376
This very release blog post is powered by the same stack, making it a delight to work with. With this, we aim to provide a superior documentation experience for Angular Three users.
376
377
378
+
### Testing (Experimental) 🧪
379
+
380
+
Angular Three v2 introduces an experimental testing module available through the `angular-three/testing` entry point. This module provides utilities to help you write unit tests for your Angular Three components and scene graphs.
381
+
382
+
:::caution
383
+
384
+
The testing API is currently in Developer Preview and may be subject to changes without following semantic versioning.
385
+
386
+
:::
387
+
388
+
### Key Features
389
+
390
+
1.**NgtTestBed**: A utility that extends Angular's TestBed, specifically tailored for Angular Three components.
391
+
2.**Mocked Rendering**: Tests run without actual 3D rendering, focusing on scene graph state assertions.
392
+
3.**Event Simulation**: Ability to simulate Three.js-specific events like `click`, `pointerover`, etc.
393
+
4.**Animation Frame Control**: Methods to advance animation frames for testing time-based behaviors.
394
+
395
+
### Basic Usage
396
+
397
+
Here's a simple example of how you might use the testing utilities:
0 commit comments