blob: 504b11c22ef264635fa3c5ea7458b1d9686681e7 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
import {LikelyType, getLikelyType} 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)
})
})
|