mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
Dacpac extension tests (#10305)
* add controller test * Add a few wizard tests * Addressing comment
This commit is contained in:
35
extensions/dacpac/src/test/testContext.ts
Normal file
35
extensions/dacpac/src/test/testContext.ts
Normal file
@@ -0,0 +1,35 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import * as vscode from 'vscode';
|
||||
import * as path from 'path';
|
||||
|
||||
export interface TestContext {
|
||||
context: vscode.ExtensionContext;
|
||||
}
|
||||
|
||||
export function createContext(): TestContext {
|
||||
let extensionPath = path.join(__dirname, '..', '..');
|
||||
|
||||
return {
|
||||
context: {
|
||||
subscriptions: [],
|
||||
workspaceState: {
|
||||
get: () => { return Promise.resolve(); },
|
||||
update: () => { return Promise.resolve(); }
|
||||
},
|
||||
globalState: {
|
||||
get: () => { return Promise.resolve(); },
|
||||
update: () => { return Promise.resolve(); }
|
||||
},
|
||||
extensionPath: extensionPath,
|
||||
asAbsolutePath: () => { return ''; },
|
||||
storagePath: '',
|
||||
globalStoragePath: '',
|
||||
logPath: '',
|
||||
extensionUri: vscode.Uri.parse('')
|
||||
}
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user