d0649e9a9e
* update: Empty state component * update type error fixes * add empty state icon * update translations on labels * update: lint error for empty state * remove unused prompt * update type errors * fix lint errors and update profile followers and profile follows * updated starterpack * fix lint errors * address feedback * update icons to be a react element * update icons * update viewbox for icons * optimize: icons and update profile lists * optimize: icons and update profile lists * lint error fix * update iconSize from the rebase
14 lines
440 B
TypeScript
14 lines
440 B
TypeScript
import {getLikelyType, LikelyType} from '../../src/lib/link-meta/link-meta'
|
|
|
|
describe('getLikelyType', () => {
|
|
it('correctly handles non-parsed url', async () => {
|
|
const output = await getLikelyType('https://example.com')
|
|
expect(output).toEqual(LikelyType.HTML)
|
|
})
|
|
|
|
it('handles non-string urls without crashing', async () => {
|
|
const output = await getLikelyType('123')
|
|
expect(output).toEqual(LikelyType.Other)
|
|
})
|
|
})
|