Skip to content

Commit

Permalink
fix tb viewer test (#427)
Browse files Browse the repository at this point in the history
  • Loading branch information
yebrahim authored and k8s-ci-robot committed Nov 30, 2018
1 parent 548a2d6 commit 71def98
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions frontend/src/components/viewers/Tensorboard.test.tsx
Expand Up @@ -67,7 +67,7 @@ describe('Tensorboard', () => {
jest.spyOn(Apis, 'getTensorboardApp').mockImplementationOnce(getAppMock);
jest.spyOn(Apis, 'startTensorboardApp').mockImplementationOnce(startAppMock);
const tree = shallow(<TensorboardViewer configs={[config]} />);
jest.spyOn(tree.instance(), 'setState').mockImplementation((state, cb) => cb());
jest.spyOn(tree.instance(), 'setState').mockImplementation((_, cb) => cb && cb());
await getAppMock;
tree.find('BusyButton').simulate('click');
await startAppMock;
Expand All @@ -82,7 +82,7 @@ describe('Tensorboard', () => {
jest.spyOn(Apis, 'getTensorboardApp').mockImplementationOnce(getAppMock);
jest.spyOn(Apis, 'startTensorboardApp').mockImplementationOnce(startAppMock);
const tree = shallow(<TensorboardViewer configs={[config, config2]} />);
jest.spyOn(tree.instance(), 'setState').mockImplementation((state, cb) => cb());
jest.spyOn(tree.instance(), 'setState').mockImplementation((_, cb) => cb && cb());
await getAppMock;
expect(getAppMock).toHaveBeenCalledWith(`Series1:${config.url},Series2:${config2.url}`);
tree.find('BusyButton').simulate('click');
Expand Down

0 comments on commit 71def98

Please sign in to comment.