1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-01-25 00:07:47 +01:00

fix(tests): correctly set baseUriPath in setupAppWithBaseUrl (#5068)

This appears to be a bug. I can confirm that the base path did not take
effect with the previous incarnation, but this should fix that.
This commit is contained in:
Thomas Heartman 2023-10-18 13:17:56 +02:00 committed by GitHub
parent b06613d1b0
commit 39aa300c05
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -296,7 +296,7 @@ export async function setupAppWithBaseUrl(
return createApp(stores, undefined, undefined, {
server: {
unleashUrl: 'http://localhost:4242',
basePathUri: '/hosted',
baseUriPath: '/hosted',
},
});
}

View File

@ -20,7 +20,7 @@ afterAll(async () => {
test('hitting a baseUri path returns HTML document', async () => {
expect.assertions(0);
await app.request
.get('/hosted')
.get('/hosted/projects')
.expect(200)
.expect('Content-Type', 'text/html; charset=utf-8');
});
@ -33,7 +33,7 @@ test('hitting an api path that does not exist returns 404', async () => {
test('hitting an /admin/api returns HTML document', async () => {
expect.assertions(0);
await app.request
.get('/admin/api')
.get('/hosted/admin/api')
.expect(200)
.expect('Content-Type', 'text/html; charset=utf-8');
});