I have a var declared in a component.ts file
declare var foo
this var is defined in index.html as <script>var foo = {}</script>
How can I mimic the declaration of index.html in Angular unit test
I am running a simple unit test to expect component to be truthy,
beforeEach(() => { fixture = TestBed.createComponent(FooComponent); component= fixture.componentInstance; fixture.detectChanges(); } it("should create", () => { expect(component).toBeTruthy; }) )
But I get the error ReferenceError: foo is not defined