Machine Learning - Bug fixes (#10377)

* Fixing ML extension bugs
This commit is contained in:
Leila Lali
2020-05-14 12:46:47 -07:00
committed by GitHub
parent d3e1675fc5
commit 0258b1727a
22 changed files with 382 additions and 126 deletions

View File

@@ -39,10 +39,12 @@ describe('Dashboard widget', () => {
await handler(testContext.view);
});
testContext.apiWrapper.setup(x => x.openExternal(TypeMoq.It.isAny())).returns(() => Promise.resolve(true));
testContext.predictService.setup(x => x.serverSupportOnnxModel()).returns(() => Promise.resolve(true));
const dashboard = new DashboardWidget(testContext.apiWrapper.object, '', testContext.predictService.object);
await dashboard.register();
testContext.onClick.fire(undefined);
testContext.apiWrapper.verify(x => x.executeCommand(TypeMoq.It.isAny()), TypeMoq.Times.atLeastOnce());
testContext.apiWrapper.verify(x => x.openExternal(TypeMoq.It.isAny()), TypeMoq.Times.atLeastOnce());
});
});