Skip to content
Snippets Groups Projects
Commit 1987f822 authored by julian.baeume's avatar julian.baeume :pick:
Browse files

propagate / endpoint via dependencies

this is an implicit endpoint served by us.
parent 0614f13d
No related branches found
No related tags found
No related merge requests found
...@@ -79,6 +79,13 @@ describe('File caching service', () => { ...@@ -79,6 +79,13 @@ describe('File caching service', () => {
expect(response.text).toBe('<html><head></head><body>it\'s me</body></html>') expect(response.text).toBe('<html><head></head><body>it\'s me</body></html>')
}) })
it('adds / to dependencies', async () => {
const response = await request(app).get('/dependencies')
expect(response.statusCode).toBe(200)
const deps = JSON.parse(response.text)
expect(deps['/']).toEqual([])
})
it('directly fetches files not referenced in manifest.json files from the upstream servers', async () => { it('directly fetches files not referenced in manifest.json files from the upstream servers', async () => {
const response = await request(app).get('/favicon.ico') const response = await request(app).get('/favicon.ico')
expect(response.statusCode).toBe(200) expect(response.statusCode).toBe(200)
......
...@@ -72,7 +72,7 @@ export function createApp () { ...@@ -72,7 +72,7 @@ export function createApp () {
app.get('/dependencies', async (req, res, next) => { app.get('/dependencies', async (req, res, next) => {
try { try {
res.json(await getDependencies()) res.json(Object.assign({ '/': [] }, await getDependencies()))
} catch (err) { } catch (err) {
next(err) next(err)
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment