mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-19 01:25:36 -05:00
Fixing bug where templates may get mapped before loaded from their files (#10111)
* Fixing potential bad order of template loading and map construction * Fixing bug where templates get mapped before loaded from file * Parallelizing loading templates from file
This commit is contained in:
@@ -8,6 +8,23 @@ import * as os from 'os';
|
||||
import * as constants from '../common/constants';
|
||||
|
||||
import { promises as fs } from 'fs';
|
||||
import should = require('should');
|
||||
import { AssertionError } from 'assert';
|
||||
|
||||
export function shouldThrowSpecificError(block: Function, expectedMessage: string) {
|
||||
let succeeded = false;
|
||||
try {
|
||||
block();
|
||||
succeeded = true;
|
||||
}
|
||||
catch (err) {
|
||||
should(err.message).equal(expectedMessage);
|
||||
}
|
||||
|
||||
if (succeeded) {
|
||||
throw new AssertionError({ message: 'Operation succeeded, but expected failure with exception: "' + expectedMessage + '"' });
|
||||
}
|
||||
}
|
||||
|
||||
export async function createTestSqlProj(contents: string, folderPath?: string): Promise<string> {
|
||||
return await createTestFile(contents, 'TestProject.sqlproj', folderPath);
|
||||
|
||||
Reference in New Issue
Block a user