fix test description
This commit is contained in:
parent
af2d12134d
commit
bfa893fde9
@ -21,14 +21,14 @@ describe('Filters', function() {
|
|||||||
var url = 'asdf https://a.example.com/wiki/asdf_qwer_(rivi%C3%A8re) Some text.',
|
var url = 'asdf https://a.example.com/wiki/asdf_qwer_(rivi%C3%A8re) Some text.',
|
||||||
link = 'asdf <a href="https://a.example.com/wiki/asdf_qwer_(rivi%C3%A8re)" target="_blank" rel="noopener noreferrer">https://a.example.com/wiki/asdf_qwer_(rivi%C3%A8re)</a> Some text.',
|
link = 'asdf <a href="https://a.example.com/wiki/asdf_qwer_(rivi%C3%A8re)" target="_blank" rel="noopener noreferrer">https://a.example.com/wiki/asdf_qwer_(rivi%C3%A8re)</a> Some text.',
|
||||||
result = $filter('conditionalLinkify')(url);
|
result = $filter('conditionalLinkify')(url);
|
||||||
expect(result).toEqual(link);
|
expect(result).toEqual(link);
|
||||||
}));
|
}));
|
||||||
|
|
||||||
it('should not make emails into links', angular.mock.inject(function($filter) {
|
it('should not make emails into links', angular.mock.inject(function($filter) {
|
||||||
var url = 'asdf@gmail.com',
|
var url = 'asdf@gmail.com',
|
||||||
link = 'asdf@gmail.com',
|
link = 'asdf@gmail.com',
|
||||||
result = $filter('conditionalLinkify')(url);
|
result = $filter('conditionalLinkify')(url);
|
||||||
expect(result).toEqual(link);
|
expect(result).toEqual(link);
|
||||||
}));
|
}));
|
||||||
|
|
||||||
it('convert the entire words to links', angular.mock.inject(function($filter) {
|
it('convert the entire words to links', angular.mock.inject(function($filter) {
|
||||||
@ -38,7 +38,7 @@ describe('Filters', function() {
|
|||||||
expect(result).toEqual(link);
|
expect(result).toEqual(link);
|
||||||
}));
|
}));
|
||||||
|
|
||||||
it('convert the entire words to links', angular.mock.inject(function($filter) {
|
it('linkify parenthesis at the end of an url', angular.mock.inject(function($filter) {
|
||||||
var text = 'http://test.com/(test)',
|
var text = 'http://test.com/(test)',
|
||||||
link = '<a href="http://test.com/(test)" target="_blank" rel="noopener noreferrer">http://test.com/(test)</a>',
|
link = '<a href="http://test.com/(test)" target="_blank" rel="noopener noreferrer">http://test.com/(test)</a>',
|
||||||
result = $filter('conditionalLinkify')(text);
|
result = $filter('conditionalLinkify')(text);
|
||||||
@ -168,6 +168,6 @@ describe('Filters', function() {
|
|||||||
expect(codifyFilter('Weird`ness`')).toEqual('Weird`ness`');
|
expect(codifyFilter('Weird`ness`')).toEqual('Weird`ness`');
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user