ANGULAR 2 Using a class within a test case provided that the class is already being used as a provider in the module -


i using class named params provider within module , want use same class inside test case.

'export class params {     public firstname: string = 'abhishek';     public lastname: string = 'parashar';     public website: string = 'parashar.com';     }` 

here spec file want use it.

'import { usersparams } '../../../comp/users/core/users.params';  export class testdata {     static userparams: usersparams = {         public firstname: string = 'abhishek';         public lastname: string = 'parashar';         public website: string = 'parashar.com';     }; describe('test case', () => {     beforeeach(() => {         testbed.configuretestingmodule({             providers: [                 { provide: usersparams, useclass: usersparams}             ]         });     });' it('should users list',         inject([componentparams], fakeasync() => {}                 );); 

i want use componentparams inside unit test case creently unable use it


Comments

Popular posts from this blog

Command prompt result in label. Python 2.7 -

javascript - How do I use URL parameters to change link href on page? -

amazon web services - AWS Route53 Trying To Get Site To Resolve To www -