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

enable skipped test

needed a little adjustment, but seems to work fine, now.
parent a25c2e13
Loading
......@@ -86,26 +86,31 @@ describe('Manifest service', () => {
expect(response2.body).toEqual([{ namespace: 'other', path: 'example' }])
})
it.skip('can load multiple configurations', async () => {
it('can load multiple configurations', async () => {
mockfs({
'./config/manifests': {
'urls.yaml': `manifests:
- https://some-fake-url.k3s.de/api/manifest.json
- https://some-other-fake-url.k3s.de/api/manifest.json`
- http://localhost:${port}/api/manifest.json
- http://localhost:${port}/api/no2/manifest.json`
}
})
mockserver.close()
mockserver = await createMockServer({ port })
mockserver.respondWith({ '/api/manifest.json': { some: 'other' } })
mockserver.respondWith({ '/api/manifest.json': generateSimpleViteManifest({ 'example1.js': 'other' }) })
mockserver.respondWith({ '/api/no2/manifest.json': generateSimpleViteManifest({ 'example2.js': 'thing' }) })
process.env.CACHE_TTL = 1
const app = createApp()
await request(app)
.get('/api/manifest.json')
.then(response => {
expect(response.statusCode).toBe(200)
expect(response.body).toEqual([{ some: 'thing"}' }, { some: 'other"}' }])
expect(response.body).toEqual([
{ namespace: 'other', path: 'example1' },
{ namespace: 'thing', path: 'example2' }
])
})
})
})
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