Skip to content

Commit

Permalink
fix: unit test
Browse files Browse the repository at this point in the history
Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
  • Loading branch information
SuZhou-Joe committed Mar 11, 2024
1 parent 2ebf302 commit fbaade6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/plugins/workspace/public/plugin.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,9 @@ describe('Workspace plugin', () => {
it('#call savedObjectsClient.setCurrentWorkspace when current workspace id changed', () => {
const workspacePlugin = new WorkspacePlugin();
const coreStart = coreMock.createStart();
const navLinksService = coreStart.chrome.navLinks;
const allNavLinks = of([] as ChromeNavLink[]);
navLinksService.getAllNavLinks$.mockReturnValue(allNavLinks);
workspacePlugin.start(coreStart);
coreStart.workspaces.currentWorkspaceId$.next('foo');
expect(coreStart.savedObjects.client.setCurrentWorkspace).toHaveBeenCalledWith('foo');
Expand Down

0 comments on commit fbaade6

Please sign in to comment.