Commit 3cee5f73 authored by jboyson's avatar jboyson

Add test coverage for bug fix

parent 187488fa
......@@ -143,10 +143,21 @@ describe('addCommentTooltip', () => {
'Commenting on symbolic links that replace or are replaced by files is currently not supported.';
const brokenRealTooltip =
'Commenting on files that replace or are replaced by symbolic links is currently not supported.';
const commentTooltip = 'Add a comment to this line';
const dragTooltip = 'Add a comment to this line or drag for multiple lines';
it('should return default tooltip', () => {
expect(utils.addCommentTooltip()).toBeUndefined();
});
it('should return comment tooltip', () => {
expect(utils.addCommentTooltip({})).toEqual(commentTooltip);
});
it('should return drag comment tooltip when dragging is enabled', () => {
expect(utils.addCommentTooltip({}, true)).toEqual(dragTooltip);
});
it('should return broken symlink tooltip', () => {
expect(utils.addCommentTooltip({ commentsDisabled: { wasSymbolic: true } })).toEqual(
brokenSymLinkTooltip,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment