2022-12-05 20:14:56 +00:00
|
|
|
import { strict as assert } from 'node:assert/strict'
|
|
|
|
import * as trends_statuses from 'wildebeest/functions/api/v1/trends/statuses'
|
2023-01-10 15:35:14 +00:00
|
|
|
import * as trends_links from 'wildebeest/functions/api/v1/trends/links'
|
2023-01-06 09:06:16 +00:00
|
|
|
import { assertJSON } from '../utils'
|
2022-12-05 20:14:56 +00:00
|
|
|
|
|
|
|
describe('Mastodon APIs', () => {
|
|
|
|
describe('trends', () => {
|
|
|
|
test('trending statuses return empty array', async () => {
|
|
|
|
const res = await trends_statuses.onRequest()
|
|
|
|
assert.equal(res.status, 200)
|
|
|
|
assertJSON(res)
|
|
|
|
|
|
|
|
const data = await res.json<any>()
|
|
|
|
assert.equal(data.length, 0)
|
|
|
|
})
|
2023-01-10 15:35:14 +00:00
|
|
|
|
|
|
|
test('trending links return empty array', async () => {
|
|
|
|
const res = await trends_links.onRequest()
|
|
|
|
assert.equal(res.status, 200)
|
|
|
|
assertJSON(res)
|
|
|
|
|
|
|
|
const data = await res.json<any>()
|
|
|
|
assert.equal(data.length, 0)
|
|
|
|
})
|
2022-12-05 20:14:56 +00:00
|
|
|
})
|
|
|
|
})
|