Skip to content

Commit

Permalink
Test spm update on a simple default package
Browse files Browse the repository at this point in the history
- The spm update command is not stable when used alongside with spm
edit, so let's just keep things simple by running the command on
defaultPackage instead.
  • Loading branch information
michael-weng committed Dec 3, 2024
1 parent 97020fb commit aa796c9
Showing 1 changed file with 21 additions and 15 deletions.
36 changes: 21 additions & 15 deletions test/integration-tests/commands/dependency.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,27 @@ suite("Dependency Commmands Test Suite", function () {
// 15 seconds for each test should be more than enough
this.timeout(15 * 1000);

suite("spm Resolve Update Contract Tests", function () {
suite("spm Update Contract Tests", function () {
let folderContext: FolderContext;
let workspaceContext: WorkspaceContext;

activateExtensionForSuite({
async setup(ctx) {
workspaceContext = ctx;
await waitForNoRunningTasks();
folderContext = await folderInRootWorkspace("defaultPackage", workspaceContext);
await workspaceContext.focusFolder(folderContext);
},
});

test("Contract: spm update", async function () {
// Contract: spm update
const result = await vscode.commands.executeCommand(Commands.UPDATE_DEPENDENCIES);
expect(result).to.be.true;
});
});

suite("spm Resolve Contract Tests", function () {
let folderContext: FolderContext;
let workspaceContext: WorkspaceContext;

Expand Down Expand Up @@ -132,19 +152,5 @@ suite("Dependency Commmands Test Suite", function () {

await assertDependencyNoLongerExists();
});

test("Contract: spm update", async function () {
// Contract: spm update
let result = await vscode.commands.executeCommand(Commands.UPDATE_DEPENDENCIES);
expect(result).to.be.true;

await useLocalDependencyTest();

// Clean up
result = await vscode.commands.executeCommand(Commands.UNEDIT_DEPENDENCY, item);
expect(result).to.be.true;

await assertDependencyNoLongerExists();
});
});
});

0 comments on commit aa796c9

Please sign in to comment.