Skip to content

Commit e19adde

Browse files
committed
Catch error in tests
1 parent a5bc25e commit e19adde

1 file changed

Lines changed: 15 additions & 14 deletions

File tree

extensions/ql-vscode/src/vscode-tests/cli-integration/packaging.test.ts

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -88,21 +88,22 @@ describe('Packaging commands', function() {
8888
);
8989
});
9090

91-
it('should install selected workspace packs', async () => {
91+
it('should attempt to install selected workspace packs', async () => {
9292
const rootDir = path.join(__dirname, '../../../src/vscode-tests/cli-integration/data');
93-
quickPickSpy.resolves(
94-
[
95-
{
96-
label: 'integration-test-queries-javascript',
97-
packRootDir: [rootDir],
98-
},
99-
]
100-
);
101-
102-
await mod.handleInstallPacks(cli, progress);
93+
quickPickSpy.resolves([
94+
{
95+
label: 'integration-test-queries-javascript',
96+
packRootDir: [rootDir],
97+
},
98+
]);
10399

104-
expect(showAndLogInformationMessageSpy.firstCall.args[0]).to.contain(
105-
'Finished installing packs.'
106-
);
100+
try {
101+
await mod.handleInstallPacks(cli, progress);
102+
expect(showAndLogInformationMessageSpy.firstCall.args[0]).to.contain(
103+
'Finished installing packs.'
104+
);
105+
} catch (error) {
106+
expect(error.message).to.contain('Unable to install packs:');
107+
}
107108
});
108109
});

0 commit comments

Comments
 (0)