0

I am using angular 4 and parse database and I am trying to implement test scripts and run using ng test command.

It returns initialize error in app.component.ts page at parse.initialize()

and error is

" Uncaught TypeError: Cannot read property 'initialize' of undefined"

I implemented sample test script below in contact component

contact.component.spec.ts:

it(should have as text 'contact page', async(() => {

expect(comp.text).toEqual('contact page');

}));

and my app.component.ts:

Parse.initialize("myAppId", "myMasterKey");

Parse.serverURL = 'http://localhost:1337/api/';

Parse.masterKey = appConfig.masterKey;
webprogrammer
  • 2,393
  • 3
  • 21
  • 27
Gopi Nath
  • 11
  • 1
  • 8

0 Answers0