Skip to content

Commit 77c419e

Browse files
authored
chore: don't hardcode the extension version in test expectations (#1002)
1 parent 5dd81dd commit 77c419e

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

Diff for: .github/workflows/draft-release.yaml

+5
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@ on:
1818
description: 'Exact version: (Only effective selecting "exact-version" as version bump)'
1919
required: false
2020

21+
description: |
22+
Run manually to prepare a draft release for the next version of the extension. The workflow will create a draft
23+
github release where the .vsix can be downloaded and manually tested before publishing. To release the version,
24+
publish the draft release, which will trigger the publish-release workflow.
25+
2126
permissions:
2227
contents: write
2328

Diff for: src/test/suite/connectionController.test.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -1249,8 +1249,10 @@ suite('Connection Controller Test Suite', function () {
12491249
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
12501250
delete mongoClientConnectionOptions!.options.oidc?.openBrowser;
12511251

1252+
// eslint-disable-next-line @typescript-eslint/no-var-requires
1253+
const expectedVersion = require('../../../package.json').version;
12521254
expect(mongoClientConnectionOptions).to.deep.equal({
1253-
url: 'mongodb://localhost:27088/?appName=mongodb-vscode+0.0.0-dev.0',
1255+
url: `mongodb://localhost:27088/?appName=mongodb-vscode+${expectedVersion}`,
12541256
options: {
12551257
autoEncryption: undefined,
12561258
monitorCommands: true,

0 commit comments

Comments
 (0)