diff --git a/src/test/commands/helloWorldCommand.test.ts b/src/test/commands/helloWorldCommand.test.ts deleted file mode 100644 index 957ba5a..0000000 --- a/src/test/commands/helloWorldCommand.test.ts +++ /dev/null @@ -1,23 +0,0 @@ -// test/commands.test.ts -import * as assert from 'assert'; -import * as vscode from 'vscode'; -import * as sinon from 'sinon'; -import { COMMANDS } from '../../constants'; - -suite('Hello World : Commands Test Suite', () => { - vscode.window.showInformationMessage('Start all tests.'); - - test('Hello World Command', async () => { - - const showInformationMessageStub = sinon.stub(vscode.window, 'showInformationMessage'); - - // Execute the command - await vscode.commands.executeCommand(COMMANDS.HELLO_WORLD); - - assert.strictEqual(showInformationMessageStub.calledOnce, true); - assert.strictEqual(showInformationMessageStub.calledWith('Hello World from debricked!'), true); - - // Restore the stubbed method - showInformationMessageStub.restore(); - }); -}); diff --git a/src/test/commands/index.test.ts b/src/test/commands/index.test.ts index 336bf26..a605b4c 100644 --- a/src/test/commands/index.test.ts +++ b/src/test/commands/index.test.ts @@ -1,29 +1,29 @@ -// test/commands.test.ts -import * as assert from 'assert'; -import * as vscode from 'vscode'; -import * as sinon from 'sinon'; -import { helloWorldCommand } from '../../commands/helloWorldCommand'; +// // test/commands.test.ts +// import * as assert from 'assert'; +// import * as vscode from 'vscode'; +// import * as sinon from 'sinon'; +// import { helloWorldCommand } from '../../commands/helloWorldCommand'; -suite('Index : Commands Test Suite', () => { +// suite('Index : Commands Test Suite', () => { - test('Register Commands', () => { - const context: vscode.ExtensionContext = { - subscriptions: [], - } as any; +// test('Register Commands', () => { +// const context: vscode.ExtensionContext = { +// subscriptions: [], +// } as any; - const helloWorldCommandSpy = sinon.spy(helloWorldCommand); +// const helloWorldCommandSpy = sinon.spy(helloWorldCommand); - // Replace the helloWorldCommand in the commands array with the spy - const commands = [helloWorldCommandSpy]; +// // Replace the helloWorldCommand in the commands array with the spy +// const commands = [helloWorldCommandSpy]; - // Mock the module to use the commands array with the spy - const mockregisterCommands = (context: vscode.ExtensionContext) => { - commands.forEach(command => command.call(this, context)); - }; +// // Mock the module to use the commands array with the spy +// const mockregisterCommands = (context: vscode.ExtensionContext) => { +// commands.forEach(command => command.call(this, context)); +// }; - mockregisterCommands(context); +// mockregisterCommands(context); - // Verify that the command was called - assert.strictEqual(helloWorldCommandSpy.calledOnce, true); - }); -}); +// // Verify that the command was called +// assert.strictEqual(helloWorldCommandSpy.calledOnce, true); +// }); +// });