Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- constructor(
- public router: Router,
- private profilService: ProfileService,
- private dragula: DragulaService,
- private alerter: AlertService
- ) {
- dragula.drag.subscribe((value) => {
- this.onDrag(value);
- });
- dragula.dragend.subscribe((value) => {
- this.onDragend(value);
- });
- }
- it('should call initializer function in constructor', () => {
- TestBed.createComponent(HomeComponent); // this is the trigger of constructor method
- expect(sideNavService.initialize).toHaveBeenCalled(); // sample jasmine spy based test case
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement