Skip to content

Commit

Permalink
removed old test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
Nagarjun Sanji committed Jul 4, 2024
1 parent 328bc8d commit 2efac79
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 45 deletions.
23 changes: 0 additions & 23 deletions src/test/commands/helloWorldCommand.test.ts

This file was deleted.

44 changes: 22 additions & 22 deletions src/test/commands/index.test.ts
Original file line number Diff line number Diff line change
@@ -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);
// });
// });

0 comments on commit 2efac79

Please sign in to comment.