I have a component with the following structure using this guidance
@Component({
  selector: 'app-component[required]',
  templateUrl: './component.component.html',
  styleUrls: ['./component.component.scss']
})
export class Component implements OnInit {
  @Input() required!: string;
  constructor() { }
  ngOnInit(): void {}
}
  
And when I execute its default test I've got the error component required at least required property and I have already tried what is they say here
here is the test I am running
describe('ComponentComponent', () => {
  let component: ComponentComponent;
  let fixture: ComponentFixture<ComponentComponent>;
  beforeEach(async () => {
    await TestBed.configureTestingModule({
      declarations: [ ComponentComponent ]
    })
    .compileComponents();
    fixture = TestBed.createComponent(ComponentComponent);
    component = fixture.componentInstance;
    component.required = 'foo';
    fixture.detectChanges();
    component.required = 'foo';
  });
  it('should create', () => {
    fixture.detectChanges();
    component.required = 'foo';
    expect(component).toBeTruthy();
  });
});