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)

Signed-off-by: Yulong Ruan <ruanyl@amazon.com>
  • Loading branch information
ruanyl authored Sep 6, 2023
1 parent 6d59211 commit 56c8971
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 56c8971

Please sign in to comment.