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:
parent
b06613d1b0
commit
39aa300c05
@ -296,7 +296,7 @@ export async function setupAppWithBaseUrl(
|
||||
return createApp(stores, undefined, undefined, {
|
||||
server: {
|
||||
unleashUrl: 'http://localhost:4242',
|
||||
basePathUri: '/hosted',
|
||||
baseUriPath: '/hosted',
|
||||
},
|
||||
});
|
||||
}
|
||||
|
@ -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');
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user