-
Notifications
You must be signed in to change notification settings - Fork 917
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: SuZhou-Joe <[email protected]>
- Loading branch information
1 parent
d55e79c
commit 5a8a728
Showing
2 changed files
with
30 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
/* | ||
* Copyright OpenSearch Contributors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
import { workspaceClientMock, WorkspaceClientMock } from './workspace_client.mock'; | ||
import { chromeServiceMock, coreMock } from '../../../core/public/mocks'; | ||
import { WorkspacePlugin } from './plugin'; | ||
|
||
describe('Workspace plugin', () => { | ||
const getSetupMock = () => ({ | ||
...coreMock.createSetup(), | ||
chrome: chromeServiceMock.createSetupContract(), | ||
}); | ||
beforeEach(() => { | ||
WorkspaceClientMock.mockClear(); | ||
Object.values(workspaceClientMock).forEach((item) => item.mockClear()); | ||
}); | ||
it('#setup', async () => { | ||
const setupMock = getSetupMock(); | ||
const workspacePlugin = new WorkspacePlugin(); | ||
await workspacePlugin.setup(setupMock); | ||
expect(WorkspaceClientMock).toBeCalledTimes(1); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters