diff options
Diffstat (limited to 'lib/utils/__tests__/location.js')
-rw-r--r-- | lib/utils/__tests__/location.js | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/utils/__tests__/location.js b/lib/utils/__tests__/location.js index f2037ff..1d75751 100644 --- a/lib/utils/__tests__/location.js +++ b/lib/utils/__tests__/location.js @@ -9,6 +9,15 @@ describe('LocationUtils', function() { expect(LocationUtils.isExternal('test.md')).toBe(false); expect(LocationUtils.isExternal('folder/test.md')).toBe(false); expect(LocationUtils.isExternal('/folder/test.md')).toBe(false); + expect(LocationUtils.isExternal('data:image/png')).toBe(false); + }); + + it('should correctly test data:uri location', function() { + expect(LocationUtils.isDataURI('data:image/png')).toBe(true); + expect(LocationUtils.isDataURI('http://google.fr')).toBe(false); + expect(LocationUtils.isDataURI('https://google.fr')).toBe(false); + expect(LocationUtils.isDataURI('test.md')).toBe(false); + expect(LocationUtils.isDataURI('data.md')).toBe(false); }); it('should correctly detect anchor location', function() { |