Skip to content

Commit

Permalink
refactor: derive currentWorkspace in workspaces_service (opensearch-p…
Browse files Browse the repository at this point in the history
…roject#126) (opensearch-project#136)

(cherry picked from commit 56c8971)

Signed-off-by: Yulong Ruan <ruanyl@amazon.com>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
1 parent ca4e5b3 commit 669fb0f
Show file tree
Hide file tree
Showing 6 changed files with 90 additions and 107 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions src/core/public/workspace/workspaces_service.mock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ import { WorkspaceAttribute } from '..';
const currentWorkspaceId$ = new BehaviorSubject<string>('');
const workspaceList$ = new BehaviorSubject<WorkspaceAttribute[]>([]);
const currentWorkspace$ = new BehaviorSubject<WorkspaceAttribute | null>(null);
const hasFetchedWorkspaceList$ = new BehaviorSubject<boolean>(false);
const initialized$ = new BehaviorSubject<boolean>(false);
const workspaceEnabled$ = new BehaviorSubject<boolean>(false);

const createWorkspacesSetupContractMock = () => ({
currentWorkspaceId$,
workspaceList$,
currentWorkspace$,
hasFetchedWorkspaceList$,
initialized$,
workspaceEnabled$,
registerWorkspaceMenuRender: jest.fn(),
});
Expand All @@ -25,7 +25,7 @@ const createWorkspacesStartContractMock = () => ({
currentWorkspaceId$,
workspaceList$,
currentWorkspace$,
hasFetchedWorkspaceList$,
initialized$,
workspaceEnabled$,
renderWorkspaceMenu: jest.fn(),
});
Expand Down
Loading

0 comments on commit 669fb0f

Please sign in to comment.