Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Workspace] Add workspace id in basePath #6060

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
feat: optimize comment
Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
  • Loading branch information
SuZhou-Joe committed Mar 12, 2024
commit d4f716c362273c59513de48b859b6752da4c7b81
12 changes: 6 additions & 6 deletions src/core/public/http/base_path.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,41 +112,41 @@ describe('BasePath', () => {
});

describe('clientBasePath', () => {
it('get path with clientBasePath', () => {
it('get with clientBasePath provided when construct', () => {
expect(new BasePath('/foo/bar', '/foo/bar', '/client_base_path').get()).toEqual(
'/foo/bar/client_base_path'
);
});

it('getBasePath with clientBasePath provided', () => {
it('getBasePath with clientBasePath provided when construct', () => {
expect(new BasePath('/foo/bar', '/foo/bar', '/client_base_path').getBasePath()).toEqual(
'/foo/bar'
);
});

it('prepend with clientBasePath provided', () => {
it('prepend with clientBasePath provided when construct', () => {
expect(new BasePath('/foo/bar', '/foo/bar', '/client_base_path').prepend('/prepend')).toEqual(
'/foo/bar/client_base_path/prepend'
);
});

it('prepend with clientBasePath provided but calls withoutClientBasePath', () => {
it('construct with clientBasePath provided but calls prepend with withoutClientBasePath is true', () => {
expect(
new BasePath('/foo/bar', '/foo/bar', '/client_base_path').prepend('/prepend', {
withoutClientBasePath: true,
})
).toEqual('/foo/bar/prepend');
});

it('remove with clientBasePath provided', () => {
it('remove with clientBasePath provided when construct', () => {
expect(
new BasePath('/foo/bar', '/foo/bar', '/client_base_path').remove(
'/foo/bar/client_base_path/remove'
)
).toEqual('/remove');
});

it('remove with clientBasePath provided but calls withoutClientBasePath', () => {
it('construct with clientBasePath provided but calls remove with withoutClientBasePath is true', () => {
expect(
new BasePath('/foo/bar', '/foo/bar', '/client_base_path').remove(
'/foo/bar/client_base_path/remove',
Expand Down
Loading