wildebeest/backend/test/mastodon/trends.spec.ts

27 wiersze
785 B
TypeScript
Czysty Zwykły widok Historia

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'
import { assertJSON } from '../utils'
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)
})
})
})