kopia lustrzana https://github.com/cloudflare/wildebeest
commit
86e8ea218c
|
@ -4,6 +4,7 @@ import * as v2_instance from 'wildebeest/functions/api/v2/instance'
|
|||
import * as apps from 'wildebeest/functions/api/v1/apps'
|
||||
import * as custom_emojis from 'wildebeest/functions/api/v1/custom_emojis'
|
||||
import * as mutes from 'wildebeest/functions/api/v1/mutes'
|
||||
import * as blocks from 'wildebeest/functions/api/v1/blocks'
|
||||
import { makeDB, assertCORS, assertJSON, assertCache, createTestClient } from './utils'
|
||||
import { createPerson } from 'wildebeest/backend/src/activitypub/actors'
|
||||
import { createSubscription } from '../src/mastodon/subscription'
|
||||
|
@ -240,4 +241,13 @@ describe('Mastodon APIs', () => {
|
|||
const data = await res.json<any>()
|
||||
assert.equal(data.length, 0)
|
||||
})
|
||||
|
||||
test('blocks returns an empty array', async () => {
|
||||
const res = await blocks.onRequest()
|
||||
assert.equal(res.status, 200)
|
||||
assertJSON(res)
|
||||
|
||||
const data = await res.json<any>()
|
||||
assert.equal(data.length, 0)
|
||||
})
|
||||
})
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
const headers = {
|
||||
'content-type': 'application/json; charset=utf-8',
|
||||
}
|
||||
|
||||
export const onRequest = async () => {
|
||||
const out: Array<any> = []
|
||||
return new Response(JSON.stringify(out), { headers })
|
||||
}
|
Ładowanie…
Reference in New Issue