test: check old megalodon version

This commit is contained in:
Mar0xy 2023-09-25 01:20:03 +02:00
parent ead0667320
commit 89eea5df52
No known key found for this signature in database
GPG key ID: 56569BBE47D2C828
230 changed files with 7537 additions and 21119 deletions

View file

@ -1,67 +0,0 @@
import { detector } from '../../src/index'
describe('detector', () => {
describe('mastodon', () => {
const url = 'https://mastodon.social'
it('should be mastodon', async () => {
const mastodon = await detector(url)
expect(mastodon).toEqual('mastodon')
})
})
describe('pleroma', () => {
const url = 'https://pleroma.io'
it('should be pleroma', async () => {
const pleroma = await detector(url)
expect(pleroma).toEqual('pleroma')
})
})
describe('misskey', () => {
const url = 'https://misskey.io'
it('should be misskey', async () => {
const misskey = await detector(url)
expect(misskey).toEqual('misskey')
})
})
describe('fedibird', () => {
const url = 'https://fedibird.com'
it('should be mastodon', async () => {
const fedibird = await detector(url)
expect(fedibird).toEqual('mastodon')
}, 20000)
})
describe('friendica', () => {
const url = 'https://squeet.me'
it('should be friendica', async () => {
const friendica = await detector(url)
expect(friendica).toEqual('friendica')
})
})
describe('akkoma', () => {
const url = 'https://pleroma.noellabo.jp'
it('should be akkoma', async () => {
const akkoma = await detector(url)
expect(akkoma).toEqual('pleroma')
})
})
describe('wildebeest', () => {
const url = 'https://wildebeest.mirror-kt.dev'
it('should be mastodon', async () => {
const wildebeest = await detector(url)
expect(wildebeest).toEqual('mastodon')
})
})
describe('unknown', () => {
const url = 'https://google.com'
it('should be null', async () => {
const unknown = detector(url)
await expect(unknown).rejects.toThrow()
})
})
})