Advertisement
Guest User

Untitled

a guest
Aug 20th, 2017
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. constructor(
  2. public router: Router,
  3. private profilService: ProfileService,
  4. private dragula: DragulaService,
  5. private alerter: AlertService
  6. ) {
  7. dragula.drag.subscribe((value) => {
  8. this.onDrag(value);
  9. });
  10. dragula.dragend.subscribe((value) => {
  11. this.onDragend(value);
  12. });
  13. }
  14.  
  15. it('should call initializer function in constructor', () => {
  16. TestBed.createComponent(HomeComponent); // this is the trigger of constructor method
  17. expect(sideNavService.initialize).toHaveBeenCalled(); // sample jasmine spy based test case
  18. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement