Here is my actual AzureService
declare var WindowsAzure;
declare var config;
@Injectable()
export class AzureService {
azureUrl;
client: any;
programmes: Programme[];
selectedProgramme: Programme;
orderSummary: Order;
constructor() {
this.client = new WindowsAzure.MobileServiceClient(this.azureUrl);}
}
Here is my dashboard spec
describe('DashboardComponent', () => {
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [
DashbaordComponent,
StatusComponent
],
providers:[ AzureService]
}).compileComponents();
}));
it('should create the app', async(() => {
const fixture = TestBed.createComponent(DashbaordComponent);
const app = fixture.debugElement.componentInstance;
expect(app).toBeTruthy();
}));
Dashboard component contractor where i am injecting azure service:
constructor(private azureService: AzureService) { }
The test is failing stating that i have not defined WindowAzure, but where am i suppose to define?
here is the error: