Skip to content

Commit

Permalink
Add missing test in MalihuScrollbarService (#15)
Browse files Browse the repository at this point in the history
- Improve code coverage
  • Loading branch information
jfcere authored Aug 23, 2017
1 parent 3646c74 commit 8d83ba8
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/app/malihu-scrollbar/malihu-scrollbar.service.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -168,5 +168,12 @@ describe('MalihuScrollbarService:unit', () => {

expect(returnValue).toBe(jQueryElement);
});

it('should throw error when element type is unsupported', () => {

const object = <any>{ object: null };

expect(() => mScrollbarService['getElement'](object)).toThrowError(`Unsupported element type in MalihuScrollbarService: ${object}`);
});
});
});

0 comments on commit 8d83ba8

Please sign in to comment.