Skip to content

Commit d6c5421

Browse files
committed
feat(core): promote core/testing to stable
1 parent 6e76304 commit d6c5421

File tree

4 files changed

+4
-13
lines changed

4 files changed

+4
-13
lines changed

apps/astro-docs/astro.config.mjs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,6 @@ export default defineConfig({
130130
{
131131
label: 'Testing',
132132
collapsed: true,
133-
badge: { text: 'Preview', variant: 'caution' },
134133
items: [
135134
{ label: 'Introduction', slug: 'core/testing/introduction' },
136135
{ label: 'NgtTestBed', slug: 'core/testing/test-bed' },
@@ -156,7 +155,6 @@ export default defineConfig({
156155
{
157156
label: 'Routed Scene',
158157
slug: 'core/advanced/routed-scene',
159-
badge: { text: 'Bug', variant: 'danger' },
160158
},
161159
{ label: 'Performance', slug: 'core/advanced/performance' },
162160
],

apps/astro-docs/src/content/docs/core/testing/introduction.mdx

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,6 @@ description: Introduction to the Angular Three Testing API
55

66
import TestBed from '../../../../components/testing/test-bed';
77

8-
:::caution
9-
10-
This API is in Developer Preview and is subject to change without following semantic versioning.
11-
12-
:::
13-
148
Angular Three Testing provides a set of utilities to help us write unit tests for the scene graphs built with Angular Three.
159

1610
In test environment, we do not **actually** render the scene graph. Instead, we assert the state of the scene graph against the expected state
@@ -56,7 +50,7 @@ class SceneGraph {
5650
The _rendered_ result of the above scene graph is as follows:
5751

5852
<div class="h-96 w-full border border-dashed border-accent-500 rounded">
59-
<TestBed client:only />
53+
<TestBed client:only />
6054
</div>
6155

6256
Our goal is to test the `SceneGraph` component and assert:

libs/core/testing/src/lib/test-bed.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ export class NgtTestBed {
5353
configurator.configure({
5454
frameloop: 'never',
5555
size: {
56-
width: mockCanvasOptions.width ?? 1280,
57-
height: mockCanvasOptions.height ?? 800,
56+
width: mockCanvasOptions.width ?? mockedCanvas.width ?? 1280,
57+
height: mockCanvasOptions.height ?? mockedCanvas.height ?? 800,
5858
top: 0,
5959
left: 0,
6060
},

libs/core/testing/src/lib/test-canvas.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,7 @@ export class NgtTestCanvas {
5454
});
5555

5656
inject(DestroyRef).onDestroy(() => {
57-
this.environmentInjector?.destroy();
58-
this.ref?.destroy();
57+
this.destroy();
5958
});
6059
}
6160

0 commit comments

Comments
 (0)