Skip to content

Commit

Permalink
test: add vscode command alicloud.api.restart test
Browse files Browse the repository at this point in the history
  • Loading branch information
yini-chen committed Apr 16, 2024
1 parent a5553e6 commit f4320ef
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions src/test/suite/extension.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,18 @@ suite("Extension Test Suite", () => {
});
});

suite("YourCommand Test Suite", () => {
test("Test alicloud.api.restart command", async () => {
// 这里我们假设指令 `extension.sayHello` 可以正常运行且不返回任何值
// 注意,对于返回结果或者有其他作用的指令,你可能需要更复杂的验证逻辑
await vscode.commands.executeCommand("alicloud.api.restart");
console.log("alicloud.api.restart successfully executed");
// suite("YourCommand Test Suite", () => {
// test("Test alicloud.api.restart command", async () => {
// // 这里我们假设指令 `extension.sayHello` 可以正常运行且不返回任何值
// // 注意,对于返回结果或者有其他作用的指令,你可能需要更复杂的验证逻辑
// await vscode.commands.executeCommand("alicloud.api.restart");
// console.log("alicloud.api.restart successfully executed");

// 如果指令成功执行,我们仅简单地验证一下(根据具体实现你还可以进行更多检查)
assert.ok(true, "alicloud.api.restart successfully executed");
// // 如果指令成功执行,我们仅简单地验证一下(根据具体实现你还可以进行更多检查)
// assert.ok(true, "alicloud.api.restart successfully executed");

// 示例:如果该指令返回了一个值,可以使用assert来验证该值
// let result = await vscode.commands.executeCommand('extension.sayHello');
// assert.strictEqual(result, 'expectedResult', 'extension.sayHello返回了意外的结果');
});
});
// // 示例:如果该指令返回了一个值,可以使用assert来验证该值
// // let result = await vscode.commands.executeCommand('extension.sayHello');
// // assert.strictEqual(result, 'expectedResult', 'extension.sayHello返回了意外的结果');
// });
// });

0 comments on commit f4320ef

Please sign in to comment.