mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-01 01:25:38 -05:00
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:
@@ -172,7 +172,7 @@ suite('Insights Utils tests', function () {
|
||||
equal(resolvedPath, queryFilePath);
|
||||
});
|
||||
|
||||
test('resolveQueryFilePath throws with workspaceRoot var and non-empty workspace not containing file', async (done) => {
|
||||
test('resolveQueryFilePath throws with workspaceRoot var and non-empty workspace not containing file', async () => {
|
||||
const tokenizedPath = path.join('${workspaceRoot}', 'test.sql');
|
||||
// Create mock context service with a folder NOT containing our test file to verify it returns original path
|
||||
const contextService = new TestContextService(
|
||||
@@ -204,11 +204,10 @@ suite('Insights Utils tests', function () {
|
||||
fail('Should have thrown');
|
||||
}
|
||||
catch (e) {
|
||||
done();
|
||||
}
|
||||
});
|
||||
|
||||
test('resolveQueryFilePath throws with workspaceRoot var and empty workspace', async (done) => {
|
||||
test('resolveQueryFilePath throws with workspaceRoot var and empty workspace', async () => {
|
||||
const tokenizedPath = path.join('${workspaceRoot}', 'test.sql');
|
||||
// Create mock context service with an empty workspace
|
||||
const contextService = new TestContextService(
|
||||
@@ -238,7 +237,6 @@ suite('Insights Utils tests', function () {
|
||||
fail('Should have thrown');
|
||||
}
|
||||
catch (e) {
|
||||
done();
|
||||
}
|
||||
});
|
||||
|
||||
@@ -298,7 +296,7 @@ suite('Insights Utils tests', function () {
|
||||
equal(resolvedPath, queryFilePath);
|
||||
});
|
||||
|
||||
test('resolveQueryFilePath throws if invalid param var specified', async (done) => {
|
||||
test('resolveQueryFilePath throws if invalid param var specified', async () => {
|
||||
const invalidPath = path.join('${INVALID}', 'test.sql');
|
||||
const configurationResolverService = new ConfigurationResolverService(
|
||||
undefined,
|
||||
@@ -323,7 +321,6 @@ suite('Insights Utils tests', function () {
|
||||
await instantiationService.invokeFunction(resolveQueryFilePath, invalidPath);
|
||||
fail('Should have thrown');
|
||||
} catch (e) {
|
||||
done();
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user