tweak for returning ns

This commit is contained in:
Devin Zuczek
2026-07-20 18:15:20 -04:00
parent aebd4ca630
commit 9ab4199bd5
3 changed files with 14 additions and 1 deletions
@@ -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)