Skip to content

Commit 1065ccd

Browse files
akshita31Ravi Chande
authored andcommitted
Make hover test pass
1 parent 29c2990 commit 1065ccd

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

test/integrationTests/codeActionRename.integration.test.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,12 @@ suite(`Code Action Rename ${testAssetWorkspace.description}`, function() {
3030
test("Code actions can remame and open files", async () => {
3131
let fileUri = await testAssetWorkspace.projects[0].addFileWithContents("test.cs", "class C {}");
3232
await vscode.commands.executeCommand("vscode.open", fileUri);
33-
let c = await vscode.commands.executeCommand("vscode.executeCodeActionProvider", fileUri, new vscode.Range(0, 7, 0, 7)) as {command: string, arguments: string[]}[];
34-
expect(c.length).to.equal(2);
35-
await vscode.commands.executeCommand(c[1].command, ...c[1].arguments)
33+
let c = await vscode.commands.executeCommand("vscode.executeCodeActionProvider", fileUri, new vscode.Range(0, 7, 0, 7)) as {command: string, title: string, arguments: string[]}[];
34+
let command = c.find(
35+
(s) => { return s.title == "Rename file to C.cs" }
36+
)
37+
expect(command, "Didn't find rename class command");
38+
await vscode.commands.executeCommand(command.command, ...command.arguments)
3639
expect(vscode.window.activeTextEditor.document.fileName).contains("C.cs");
3740
});
3841
});

test/integrationTests/hoverProvider.integration.test.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -72,12 +72,11 @@ Parameters:
7272
\t\tgameObject: The game object.
7373
\t\ttagName: Name of the tag.
7474
75-
Returns trueif object is tagged with tag.`;
75+
Returns true if object is tagged with tag.`;
7676
expect(c[0].contents[0].value).to.equal(answer);
7777
});
7878

79-
teardown(async() =>
80-
{
81-
await testAssetWorkspace.cleanupWorkspace();
82-
})
79+
teardown(async () => {
80+
await testAssetWorkspace.cleanupWorkspace();
81+
});
8382
});

0 commit comments

Comments
 (0)