Skip to content

Commit dc19c35

Browse files
committed
Clean up integration tests
1 parent 5e16e22 commit dc19c35

File tree

2 files changed

+8
-11
lines changed

2 files changed

+8
-11
lines changed

test/integrationTests/codeActionRename.integration.test.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,19 @@ suite(`Code Action Rename ${testAssetWorkspace.description}`, function() {
2727

2828
});
2929

30-
test("Code actions can remame and open files", async () => {
30+
test("Code actions can rename and open files", async () => {
3131
let fileUri = await testAssetWorkspace.projects[0].addFileWithContents("test.cs", "class C {}");
3232
await vscode.commands.executeCommand("vscode.open", fileUri);
3333
let c = await vscode.commands.executeCommand("vscode.executeCodeActionProvider", fileUri, new vscode.Range(0, 7, 0, 7)) as {command: string, title: string, arguments: string[]}[];
3434
let command = c.find(
35-
(s) => { return s.title == "Rename file to C.cs" }
36-
)
35+
(s) => { return s.title == "Rename file to C.cs"; }
36+
);
3737
expect(command, "Didn't find rename class command");
3838
await vscode.commands.executeCommand(command.command, ...command.arguments)
3939
expect(vscode.window.activeTextEditor.document.fileName).contains("C.cs");
4040
});
41+
42+
teardown(async () => {
43+
await testAssetWorkspace.cleanupWorkspace();
44+
});
4145
});

test/integrationTests/hoverProvider.integration.test.ts

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,24 +17,17 @@ const chai = require('chai');
1717
chai.use(require('chai-arrays'));
1818
chai.use(require('chai-fs'));
1919

20-
suite(`Tasks generation: ${testAssetWorkspace.description}`, function() {
20+
suite(`Hover Provider: ${testAssetWorkspace.description}`, function() {
2121
suiteSetup(async function() {
2222
should();
2323

24-
await testAssetWorkspace.cleanupWorkspace();
25-
2624
let csharpExtension = vscode.extensions.getExtension("ms-vscode.csharp");
2725
if (!csharpExtension.isActive) {
2826
await csharpExtension.activate();
2927
}
3028

3129
await csharpExtension.exports.initializationFinished;
3230
await omnisharp.restart();
33-
34-
await vscode.commands.executeCommand("dotnet.generateAssets");
35-
36-
await poll(async () => await fs.exists(testAssetWorkspace.launchJsonPath), 10000, 100);
37-
3831
});
3932

4033
test("Hover returns structured documentation with proper newlines", async function () {

0 commit comments

Comments
 (0)