mirror of
https://github.com/djdevin/recflare.git
synced 2026-09-09 07:01:27 -07:00
tweak for returning ns
This commit is contained in:
@@ -21,6 +21,13 @@ describe('mono routing', () => {
|
||||
expect(res.headers.get('content-type')).toContain('application/json')
|
||||
})
|
||||
|
||||
test('the facade host (mono.<domain>) falls back to the ns discovery worker', async () => {
|
||||
const res = await exports.default.fetch('https://mono.recflare.net/')
|
||||
expect(res.status).toBe(200)
|
||||
// The ns worker serves the service-discovery document.
|
||||
expect(await res.json()).toHaveProperty('Auth')
|
||||
})
|
||||
|
||||
test('unknown service prefix returns the facade 404', async () => {
|
||||
const res = await exports.default.fetch(`${ORIGIN}/nope/whatever`)
|
||||
expect(res.status).toBe(404)
|
||||
|
||||
Reference in New Issue
Block a user