mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-16 17:22:29 -05:00
resend previous PR with test fixes (#19912)
* Revert "Revert "use reliable way to detect createtable statements (#19897)" (#19906)"
This reverts commit c211fb981c.
* fix tests
* fix test cases
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
import * as path from 'path';
|
||||
import * as os from 'os';
|
||||
import * as constants from '../common/constants';
|
||||
import * as templates from '../templates/templates';
|
||||
|
||||
import { promises as fs } from 'fs';
|
||||
import should = require('should');
|
||||
@@ -30,6 +31,10 @@ export async function shouldThrowSpecificError(block: Function, expectedMessage:
|
||||
|
||||
export async function createTestSqlProjFile(contents: string, folderPath?: string): Promise<string> {
|
||||
folderPath = folderPath ?? path.join(await generateTestFolderPath(), 'TestProject');
|
||||
const macroDict: Record<string, string> = {
|
||||
'PROJECT_DSP': constants.defaultDSP
|
||||
};
|
||||
contents = templates.macroExpansion(contents, macroDict);
|
||||
return await createTestFile(contents, 'TestProject.sqlproj', folderPath);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user