From 1250a0319a70e8ee9518e0472b7db474350e63fa Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Julian=20B=C3=A4ume?= <julian.baeume@open-xchange.com>
Date: Fri, 24 Sep 2021 12:40:37 +0200
Subject: [PATCH] enable skipped test

needed a little adjustment, but seems to work fine, now.
---
 spec/server_test.js | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/spec/server_test.js b/spec/server_test.js
index 9c7ac5c..ac2daf9 100644
--- a/spec/server_test.js
+++ b/spec/server_test.js
@@ -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' }
+        ])
       })
   })
 })
-- 
GitLab