@@ -25,11 +25,7 @@ import { FolderContext } from "../../../src/FolderContext";
25
25
import { WorkspaceContext } from "../../../src/WorkspaceContext" ;
26
26
import * as sinon from "sinon" ;
27
27
import { Commands } from "../../../src/commands" ;
28
- import {
29
- activateExtensionForSuite ,
30
- activateExtensionForTest ,
31
- folderInRootWorkspace ,
32
- } from "../utilities/testutilities" ;
28
+ import { activateExtensionForSuite , folderInRootWorkspace } from "../utilities/testutilities" ;
33
29
34
30
suite ( "Dependency Commmands Test Suite" , function ( ) {
35
31
// full workflow's interaction with spm is longer than the default timeout
@@ -82,7 +78,7 @@ suite("Dependency Commmands Test Suite", function () {
82
78
let treeProvider : PackageDependenciesProvider ;
83
79
let item : PackageNode ;
84
80
85
- activateExtensionForTest ( {
81
+ activateExtensionForSuite ( {
86
82
async setup ( ctx ) {
87
83
// Check before each test case start:
88
84
// Expect to fail without setting up local version
@@ -111,13 +107,14 @@ suite("Dependency Commmands Test Suite", function () {
111
107
// Contract: spm edit with user supplied local version of dependency
112
108
const windowMock = sinon . stub ( vscode . window , "showOpenDialog" ) ;
113
109
windowMock . resolves ( [ testAssetUri ( "Swift-Markdown" ) ] ) ;
114
- const result = await vscode . commands . executeCommand (
115
- Commands . USE_LOCAL_DEPENDENCY ,
116
- item
117
- ) ;
110
+ let result = await vscode . commands . executeCommand ( Commands . USE_LOCAL_DEPENDENCY , item ) ;
118
111
expect ( result ) . to . be . true ;
119
112
windowMock . restore ( ) ;
120
113
114
+ // Make sure new dependencies resolve before building
115
+ result = await vscode . commands . executeCommand ( Commands . RESOLVE_DEPENDENCIES ) ;
116
+ expect ( result ) . to . be . true ;
117
+
121
118
// This will now pass as we have the required library
122
119
const { exitCode, output } = await executeTaskAndWaitForResult ( tasks ) ;
123
120
expect ( exitCode , `${ output } ` ) . to . equal ( 0 ) ;
0 commit comments