Closed kalingaCoder closed 4 years ago
Hmm, I don't get errors with the following:
import { Component } from "@angular/core";
@Component({
selector: "dfdf"
})
export class dfdf {
variable: string[] = ["dfdfer"];
constructor() {}
}
I get:
import { ComponentFixture, TestBed } from "@angular/core/testing";
import { NO_ERRORS_SCHEMA } from "@angular/core";
import { dfdf } from "./CoreHost";
describe("dfdf", () => {
let component: dfdf;
let fixture: ComponentFixture<dfdf>;
beforeEach(() => {
TestBed.configureTestingModule({
schemas: [NO_ERRORS_SCHEMA],
declarations: [dfdf]
});
fixture = TestBed.createComponent(dfdf);
component = fixture.componentInstance;
});
it("can load instance", () => {
expect(component).toBeTruthy();
});
it("variable defaults to: ['dfdfer']", () => {
expect(component.variable).toEqual(["dfdfer"]);
});
});
Could you check how to repro the issue?
Thank you for reporting an issue with SimonTest. When submitting an issue please include a snipet of code to reproduce the problem. Take the component file and delete everything not required to reproduce the error.
import { Component} from '@angular/core';
@Component({ selector: 'dfdf' }) export class dfdf { variable: string[] = ["dfdfer"]; constructor() {} }