Swapping Record usage to Map in SQL Projects (#22758)

* Changing SqlCmdVars from Record to Map

* Converting the rest

* Updating tests

* more cleanup

* Updating test to use new test creation API
This commit is contained in:
Benjin Dubishar
2023-04-17 12:56:39 -07:00
committed by GitHub
parent 4a4580e9ef
commit 02e61d1598
21 changed files with 132 additions and 138 deletions

View File

@@ -43,9 +43,7 @@ export async function getTestProjectPath(test: Mocha.Runnable | undefined): Prom
export async function createTestSqlProjFile(test: Mocha.Runnable | undefined, contents: string, folderPath?: string): Promise<string> {
folderPath = folderPath ?? path.join(await generateTestFolderPath(test), 'TestProject');
const macroDict: Record<string, string> = {
'PROJECT_DSP': constants.defaultDSP
};
const macroDict: Map<string, string> = new Map([['PROJECT_DSP', constants.defaultDSP]]);
contents = templates.macroExpansion(contents, macroDict);
return await createTestFile(test, contents, 'TestProject.sqlproj', folderPath);
}