angular/adev/shared-docs/components/select/select.component.spec.ts
Matthieu Riegler 3a85031dc0 docs(docs-infra): Modernize tests
Remove usages of `detectChanges` and rely on `whenStable`.
This commit also removed the usage of `provideZonelessChangeDetection` which is no longer necessary.
2026-01-05 11:47:08 -05:00

32 lines
828 B
TypeScript

/*!
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.dev/license
*/
import {ComponentFixture, TestBed} from '@angular/core/testing';
import {Select} from './select.component';
describe('Select', () => {
let component: Select;
let fixture: ComponentFixture<Select>;
beforeEach(async () => {
fixture = TestBed.createComponent(Select);
component = fixture.componentInstance;
// Sets the required inputs
fixture.componentRef.setInput('selectId', 'id');
fixture.componentRef.setInput('name', 'name');
fixture.componentRef.setInput('options', []);
await fixture.whenStable();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});