Swapping vscode calls for ApiWrapper for testability (#10267)

* swapping vscode calls for apiwrapper for testability

* Adding mainController tests

* Adding unit tests for input validation

* Adding project controller tests, reorganizing error handling

* Removing commented-out code
This commit is contained in:
Benjin Dubishar
2020-05-06 14:16:27 -07:00
committed by GitHub
parent 0ace033a6f
commit 80901c9a7b
10 changed files with 373 additions and 108 deletions

View File

@@ -14,8 +14,8 @@ describe('Templates: loading templates from disk', function (): void {
});
it('Should throw error when attempting to use templates before loaded from file', async function (): Promise<void> {
shouldThrowSpecificError(() => templates.projectScriptTypeMap(), 'Templates must be loaded from file before attempting to use.');
shouldThrowSpecificError(() => templates.projectScriptTypes(), 'Templates must be loaded from file before attempting to use.');
await shouldThrowSpecificError(() => templates.projectScriptTypeMap(), 'Templates must be loaded from file before attempting to use.');
await shouldThrowSpecificError(() => templates.projectScriptTypes(), 'Templates must be loaded from file before attempting to use.');
});
it('Should load all templates from files', async function (): Promise<void> {