Skip to content

Commit 54cc60d

Browse files
committed
test: make test components standalone
1 parent da60116 commit 54cc60d

File tree

3 files changed

+7
-12
lines changed

3 files changed

+7
-12
lines changed

projects/hyperdash-angular/src/editor/model-json/model-json-editor.component.test.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,16 +33,15 @@ class TestModel {
3333
@ModelPropertyEditor({ propertyType: TEST_PROP_TYPE.type })
3434
@Component({
3535
selector: 'hda-prop-editor',
36-
template: 'property editor',
37-
standalone: false
36+
template: 'property editor'
3837
})
3938
class PropEditorComponent {
4039
public constructor(@Inject(EDITOR_API) public editorApi: EditorApi<string>) {}
4140
}
4241

4342
@NgModule({
44-
declarations: [PropEditorComponent],
4543
imports: [
44+
PropEditorComponent,
4645
DashboardCoreModule.with({
4746
models: [TestModel],
4847
propertyTypes: [TEST_PROP_TYPE]

projects/hyperdash-angular/src/editor/model/model-editor.component.test.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,7 @@ describe('Model editor component', () => {
2828

2929
@Component({
3030
selector: 'hda-prop-editor',
31-
template: 'property editor',
32-
standalone: false
31+
template: 'property editor'
3332
})
3433
class PropEditorComponent {}
3534

@@ -44,8 +43,7 @@ describe('Model editor component', () => {
4443
{ provide: ModelEditorService, useValue: {} },
4544
{ provide: ModelChangedEventService, useValue: mockModelChangedEvent }
4645
],
47-
declarations: [PropEditorComponent],
48-
imports: [HostComponent, DashboardEditorModule]
46+
imports: [HostComponent, DashboardEditorModule, PropEditorComponent]
4947
});
5048

5149
mockModelEditorService = TestBed.inject(ModelEditorService);

projects/hyperdash-angular/src/rendering/dashboard-renderer.service.test.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ describe('Dashboard Renderer Service', () => {
2424

2525
beforeEach(async () => {
2626
await TestBed.configureTestingModule({
27-
declarations: [HostComponent, RendererComponent]
27+
imports: [HostComponent, RendererComponent]
2828
}).compileComponents();
2929

3030
dashboardRendererService = TestBed.inject(DashboardRendererService);
@@ -181,8 +181,7 @@ describe('Dashboard Renderer Service', () => {
181181

182182
@Component({
183183
selector: 'hda-dash-angular-renderer-service-host',
184-
template: 'Host > <ng-container #container><ng-container>',
185-
standalone: false
184+
template: 'Host > <ng-container #container><ng-container>'
186185
})
187186
class HostComponent {
188187
@ViewChild('container', { read: ViewContainerRef, static: true })
@@ -195,8 +194,7 @@ class TestModel {
195194

196195
@Component({
197196
selector: 'hda-dash-angular-renderer-service-renderer',
198-
template: '{{ api.model.modelProp }}',
199-
standalone: false
197+
template: '{{ api.model.modelProp }}'
200198
})
201199
class RendererComponent {
202200
public constructor(@Inject(RENDERER_API) public readonly api: RendererApi<TestModel>) {}

0 commit comments

Comments
 (0)