Properly expose errors in ads and tests (#8692)

* add code to expose errors outside zone

* remove unexpect error hiding

* remove uncessary code

* fix tests

* trying to catch more errros

* revert for testing

* wip

* wip

* figured out what was going on

* wip

* fix tests

* fix tests
This commit is contained in:
Anthony Dresser
2019-12-17 12:06:36 -08:00
committed by GitHub
parent 6b5c31410d
commit ea5f9be441
29 changed files with 483 additions and 790 deletions

View File

@@ -13,7 +13,6 @@ import { IMainContext } from 'vs/workbench/api/common/extHost.protocol';
import { ExtHostNotebook } from 'sql/workbench/api/common/extHostNotebook';
import { MainThreadNotebookShape } from 'sql/workbench/api/common/sqlExtHost.protocol';
import * as testUtils from '../../../../base/test/common/async';
import { INotebookManagerDetails } from 'sql/workbench/api/common/sqlExtHostTypes';
import { mssqlProviderName } from 'sql/platform/connection/common/constants';
@@ -40,7 +39,10 @@ suite('ExtHostNotebook Tests', () => {
suite('getNotebookManager', () => {
test('Should throw if no matching provider is defined', async () => {
await testUtils.assertThrowsAsync(() => extHostNotebook.$getNotebookManager(-1, notebookUri));
try {
await extHostNotebook.$getNotebookManager(-1, notebookUri);
assert.fail('expected to throw');
} catch (e) { }
});
suite('with provider', () => {
let providerHandle: number = -1;