Skip to content

Commit

Permalink
fix(tests): correctly set baseUriPath in setupAppWithBaseUrl (#5068)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
thomasheartman authored Oct 18, 2023
1 parent b06613d commit 39aa300
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/test/e2e/helpers/test-helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ export async function setupAppWithBaseUrl(
return createApp(stores, undefined, undefined, {
server: {
unleashUrl: 'http://localhost:4242',
basePathUri: '/hosted',
baseUriPath: '/hosted',
},
});
}
4 changes: 2 additions & 2 deletions src/test/e2e/routes/routes.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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');
});
Expand All @@ -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');
});
Expand Down

0 comments on commit 39aa300

Please sign in to comment.